Giter VIP home page Giter VIP logo

Comments (8)

azicchetti avatar azicchetti commented on August 26, 2024

I think this issue is not related to the router because it can't do anything to "harm" pages or application layouts. Popups don't even trigger page events.
The issue may reside in jquery mobile itself (but it's not likely) or in some event handler used in your code.

If you provide a tgz or a zip file of the source code, I'll try and see if the issue can be tracked down in a short amount of time.

Cheers,
Andrea

from jquerymobile-router.

azicchetti avatar azicchetti commented on August 26, 2024

It turns out I was wrong.

The router was forcing a useless changePage that, under normal circumstances, is harmless.
In this specific case, jQuery Mobile was failing, probably due to a bug, during the page transition.

@bardu found out that the issue could be partially solved by disabling the slide effect.

However, I've patched the router to avoid the forced changePage when the popup is closed.

from jquerymobile-router.

 avatar commented on August 26, 2024

I have a new use case where I need to initialize and open a popup programmatically like:

$('#popupLogin').popup();
$('#popupLogin').popup('open');

Then I see the same issue as of before your patch, could you please check?

from jquerymobile-router.

 avatar commented on August 26, 2024

$('#popupLogin').popup({ history: false });

didn't help either.

from jquerymobile-router.

azicchetti avatar azicchetti commented on August 26, 2024

Hi bardu,
unfortunately the popup api and implementation seem way too inconsistent to build something on them.
The .popup("open") call don't even trigger a pagebeforechange event, nor popup events.
Writing a patch without these hook points is impossible.

I've noticed, however, that if you have a link such as:

<a href="#popupMap" id="mylink123" data-rel="popup">Open Popup</a>

Calling:

$("#mylink123").trigger("click");

produces the expected results (jQM fires the right events and the router can perform its task).

from jquerymobile-router.

 avatar commented on August 26, 2024

Hi Andrea,

I have tried your suggestion before, but it didn't work in my use case, and I run into more issues with the popup widget not related to routing.

I find the popup widget pretty useful, but as you said, it isn't mature enough to build something on it.

So, for now I will revert to a dialog widget for my latest use case and will see what jQM 1,2,1 has to offer regarding popup.

from jquerymobile-router.

azicchetti avatar azicchetti commented on August 26, 2024

Il 18/10/2012 18:33, bardu ha scritto:

I find the popup widget pretty useful, but as you said, it isn't mature
enough to build something on it.

So, for now I will revert to a dialog widget for my latest use case and
will see what jQM 1,2,1 has to offer regarding popup.

If you don't mind, I'll email you a popup widget I've been using for the
last year in my jQM projects.
It's a small backbone view with a couple of methods, but you can easily
revert it to a standard function if you want.

from jquerymobile-router.

 avatar commented on August 26, 2024

Much appreciated, I'm using backbone anyway!

from jquerymobile-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.