New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupt popup transition even when it's already in progress. #6602

Closed
gabrielschulhof opened this Issue Oct 13, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@gabrielschulhof
Contributor

gabrielschulhof commented Oct 13, 2013

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. .when() they are all resolved, we trigger popupafteropen/popupafterclose.

@ghost ghost assigned gabrielschulhof Oct 13, 2013

@Ruffio

This comment has been minimized.

Show comment
Hide comment
@Ruffio

Ruffio Nov 10, 2014

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
(Sorry for bad quality and wrong mode)

Ruffio commented Nov 10, 2014

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
(Sorry for bad quality and wrong mode)

@Ruffio

This comment has been minimized.

Show comment
Hide comment
@Ruffio

Ruffio Nov 12, 2014

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.

Ruffio commented Nov 12, 2014

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.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Jan 14, 2015

Contributor

I think we've got the original problem covered with @arschmitz's new .animationComplete() implementation: http://jsbin.com/subowa/8. It's still not perfect on Chrome, and I'm finding some issues with .animationComplete(), but it seems to serve its purpose. #3414 remains relevant.

Contributor

gabrielschulhof commented Jan 14, 2015

I think we've got the original problem covered with @arschmitz's new .animationComplete() implementation: http://jsbin.com/subowa/8. It's still not perfect on Chrome, and I'm finding some issues with .animationComplete(), but it seems to serve its purpose. #3414 remains relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment