Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Interrupt popup transition even when it's already in progress. #6602
Related to #6221. Fix the Chrome ugliness illustrated in http://jsbin.com/ofuhaw/614/. To do that, we need to decouple the navigation from the animation. That is, when one closes the popup, we issue $.mobile.back(), but we don't necessarily have to wait for the ensuing nav event to close the popup.
Basically, we should formalize the fact that we have a list of prerequisites for a popup to be considered fully open, and we have a list of prerequisites for a popup to be considered fully closed. These prerequisites are of two varieties: navigational prerequisites (if the nav extension is present) and animational prerequisites (if the transition extension is present).
When the user initiates either action, we assemble an array of deferreds, one for each prerequisite, and then we initiate the actions necessary for the eventual resolution of each deferred in the array.
I can't figure out if this is related, but on Nexus 7 (4.4.4/Chrome 38) if you go to demo page for transition (http://demos.jquerymobile.com/1.4.5/transitions/), click on slide page and then quickly click on slide dialog, then the transitions are queued up so first the page transition occurs and the dialog transition occurs. It is also related to #3382
In my opinion it should not be possible to queue/start new transitions when there is already one that is 'started'. This is relevant in situations with a slow connection where the user 'gets the time' to push other buttons (starting new transitions).
Here is a video:https://drive.google.com/file/d/0B0VrAFWWKQ_SYXRqb2JjX2tHcU0/view?usp=sharing
This relates to #3414. I guess there are differentieret usecases that is relevant here. Some points to that it should be possible and some points to that it shouldn't be possible to interupt an action/transition/navigation. I guess that a global option would be ideal thereby allowing the developer to deside if interruptions are allowed or not. If not the transparent layer as suggested seams like a good idea.