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
scroll position is not restored when using defaultPageTransition = "none" #7148
Hi guys -
Hopefully I can make this understandable.
When clicking a link on my search results page, then clicking a data-rel="back" link from the details page, the scroll position on the search results is not correctly restored, and seems to always return to the position of the first item clicked.
STEPS TO REPRODUCE ISSUE
STEPS TO REPRODUCE CORRECT BEHAVIOR
The reason it stops working is that the pagecontainer does not receive a navigate event when returning from Page 2. It has a handler for navigate which would turn scroll recording back on. On FF it receives the navigate event upon the first return, but not the second, and on Chrome it doesn't receive the navigate event even after the first return.
OK. I believe I have identified the root cause. During
The solution is simple: Attach the handler that performs the page change after the handler that turns off the scrolling.