Scroll position is different after rotating from portrait to landscape
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: csheany, Unassigned)
References
(Depends on 1 open bug)
Details
User Agent: Mozilla/5.0 (Android 7.1.1; Tablet; rv:67.0) Gecko/67.0 Firefox/67.0
Steps to reproduce:
- Open https://github.com/mozilla-mobile
- Request desktop site
- Scroll to the bottom
- Rotate to landscape
Actual results:
The middle of the page is in view.
Expected results:
The bottom of the page is in view.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Scroll position not being preserved across rotations is a long-standing known issue.
The reason for it is that the representation of the scroll position that's preserved across the rotation is a numerical offset in pixels. When the device is rotated, the page content is laid out into a different width, and as a result there can be different content at the same numerical offset.
There is a new spec called Scroll Anchoring [1] that's intended to address issues like this. It was recently implemented in Firefox, and I believe it's enabled in Nightly. Perhaps Ryan can comment on why it's not kicking in for this website.
Updated•5 years ago
|
Updated•2 years ago
|
Description
•