Vertical scroll position is not saved when pressing back button




4 years ago
4 years ago


(Reporter: kgrandon, Unassigned)



Gonk (Firefox OS)

Firefox Tracking Flags





4 years ago
This is probably a dupe, but I can't immediately find the bug. One of my biggest painpoints when using the browser is that the vertical scroll position is not saved when pressing the back button.

Comment 1

4 years ago
Smaug, Kats - By chance do you guys know how this works today on B2G? It seems when I press the back button the page instantly loads, so I assume we're leveraging some kind of cache here. The scroll position is unfortunately not remembered though. Any pointers/ideas?
Flags: needinfo?(bugs)
Flags: needinfo?(bugmail.mozilla)
Strangely, this sometimes work, sometimes not, even on the same site.
Though I think that never works in if you need a testcase.
Do we do the panning/scrolling asynchronously on b2g? If so, could this be a timing issue?
And indeed, position is saved occasionally. A testcase showing when the position is saved and when
not would be good.
Yes, we're doing async pan/zoom on b2g, except in the system app but that doesn't apply there.
In general restoring the scroll position should work, since that happens in the layout code and then pushed over to the APZ/compositor via the usual mechanisms. From prior experience on fennec though there might be cases involving things like pinch-zoom or font inflation which affect the scroll position or where content visually appears on the screen and layout's restored scroll position might not take those into account. :esawin landed some code not to long ago to fix some of these cases on fennec and we might need to use that code on B2G as well. If we have reliable STR then we should be able to investigate and fix it.
Flags: needinfo?(bugmail.mozilla)
Component: General → Panning and Zooming
OS: Mac OS X → Gonk (Firefox OS)
Product: Firefox OS → Core
Hardware: x86 → ARM
(Feel free to request blocking status if you feel this is important and we can prioritize accordingly)
Kats, you can repro 100% by loading, scrolling down open a page and then go back in history.
Is this still happening?
Flags: needinfo?(kgrandon)

Comment 9

4 years ago
(In reply to Gregor Wagner [:gwagner] from comment #8)
> Is this still happening?

Yes, but not on all sites. is a good example.
Flags: needinfo?(kgrandon)
Adding Milan for prioritization.
Flags: needinfo?(milan)
Keywords: dogfood
We can add it to backlog.
tracking-b2g: --- → backlog
Flags: needinfo?(milan)
Kevin, has the situation perhaps improved a bit (in Nightlies)? There was a change to scrolling / popstate handling which made us work closer to webkit/blink.
Flags: needinfo?(bugs) → needinfo?(kevingrandon)

Comment 13

4 years ago
After playing with scrolling for a bit, this actually seems much better now. I'll file a new bug if I see anything, thanks for the work here!
Last Resolved: 4 years ago
Flags: needinfo?(kevingrandon)
Resolution: --- → WORKSFORME
The change happened in Bug 1186774.
You need to log in before you can comment on or make changes to this bug.