Open Bug 1524170 Opened 5 years ago Updated 2 years ago

Scroll position is different after rotating from portrait to landscape

Categories

(Core :: Panning and Zooming, defect, P3)

67 Branch
All
Android
defect

Tracking

()

UNCONFIRMED

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:

  1. Open https://github.com/mozilla-mobile
  2. Request desktop site
  3. Scroll to the bottom
  4. Rotate to landscape

Actual results:

The middle of the page is in view.

Expected results:

The bottom of the page is in view.

Component: General → Panning and Zooming
OS: Unspecified → Android
Product: Firefox for Android → Core
Hardware: Unspecified → All
Version: Firefox 67 → 67 Branch

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.

[1] https://drafts.csswg.org/css-scroll-anchoring/

Depends on: 1305957
Priority: -- → P3
Depends on: scroll-anchoring
No longer depends on: 1305957
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.