-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Wrong transition when using back/forward browser buttons #1867
Comments
Sounds like we need a condition that says, "when we think it's a "back button" click, use the transition from the current page, rather than the page we're going to... |
Is this still an issue with 1.0.1? |
@toddparker @scottjehl here's a jsfiddle to illustrate: It is still present in latest |
Thanks for the jsfiddle @agcolom - we'll give this a look. |
Here is another example of the same issue http://jsfiddle.net/645Xm/ If you use the buttons in the window then the animations go in the correct directions but if you use the browser back button with the right click menu on the second page then the following animation back to the first page is in the wrong direction. |
The setup as described by the OP: http://jsbin.com/IFolanOW/493/ |
Our history entries contain exactly one transition: The one used to arrive at the entry. In addition, the index of the current entry and that of the previous entry is updated before the value for the transition is computed. So, it makes sense, when going backwards, to read the transition value from the previous entry, because that value stores the transition that was used to get there from where history is currently at. However, when going forward, it makes no sense to read the transition value from the previous entry, because that one stores the transition that was used to reach it, not the transition that must be used to reach the next entry. Fixes gh-1867
Our history entries contain exactly one transition: The one used to arrive at the entry. In addition, the index of the current entry and that of the previous entry is updated before the value for the transition is computed. So, it makes sense, when going backwards, to read the transition value from the previous entry, because that value stores the transition that was used to get there from where history is currently at. However, when going forward, it makes no sense to read the transition value from the previous entry, because that one stores the transition that was used to reach it, not the transition that must be used to reach the next entry. Closes gh-7485 Fixes gh-1867 Fixes gh-4951
Our history entries contain exactly one transition: The one used to arrive at the entry. In addition, the index of the current entry and that of the previous entry is updated before the value for the transition is computed. So, it makes sense, when going backwards, to read the transition value from the previous entry, because that value stores the transition that was used to get there from where history is currently at. However, when going forward, it makes no sense to read the transition value from the previous entry, because that one stores the transition that was used to reach it, not the transition that must be used to reach the next entry. Closes jquery-archivegh-7485 Fixes jquery-archivegh-1867 Fixes jquery-archivegh-4951
The transition effect is not performed correctly when using back/forward browser buttons.
How to reproduce (tested with iOS 4.3.2 and Android 2.2):
It seems the page history remembers only the transition effect that was used to get to it, but not the transition effect that was used to get from it.
The text was updated successfully, but these errors were encountered: