UNCONFIRMED 83813
popstate restores incorrect scroll position if destination page is longer than the previous
https://bugs.webkit.org/show_bug.cgi?id=83813
Summary popstate restores incorrect scroll position if destination page is longer tha...
Joshua Peek
Reported 2012-04-12 13:26:49 PDT
Created attachment 136958 [details] popstate scroll restore test case If you scroll to the bottom of a long page and use pushstate to navigate forward, going back will restore the wrong position. The restored positioned will be clipped to the max height of the previous page rather than fully scrolling to the bottom. It seems that if you force a synchronous relayout/reflow within the popstate handler, the position will be restored correctly. The bug affects Safari, Chrome, and Firefox. But the hack doesn't appear to fix it in Firefox. Strangely it all works fine if you use the back/forward touch gestures in Safari. See the attached test case. (Note that uncommenting the relayout line fixes the issue) Possibly related issues: * https://bugs.webkit.org/show_bug.cgi?id=33931
Attachments
popstate scroll restore test case (4.83 KB, text/html)
2012-04-12 13:26 PDT, Joshua Peek
no flags
testcase.diff (2.10 KB, text/x-diff)
2012-04-12 14:28 PDT, Joshua Peek
no flags
Joshua Peek
Comment 1 2012-04-12 14:28:47 PDT
Created attachment 136974 [details] testcase.diff
Note You need to log in before you can comment on or make changes to this bug.