Closed Bug 1943865 Opened 28 days ago Closed 19 days ago

Consider scrolling visually to position:fixed descendants on scrollIntoView call

Categories

(Core :: Layout: Scrolling and Overflow, defect, P2)

defect

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox135 --- wontfix
firefox136 --- wontfix
firefox137 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

Attachments

(2 files)

Attached file A test case

(though I personally think this bug is not S2, but the original bug 1943053 is S2)

This is the root cause of bug 1943053.

Attaching file has an input element inside a position:fixed element.

STR;

  1. Pinch zoom-in the content to make the input element outside of the viewport
  2. Push the "scroll to input" button

On Chrome the input element is scrolled into the (visual) viewport.
On Firefox it doesn't.

Note that Safari doesn't either. :/

In the case of position:fixed frame, walking up the frame tree doesn't
reach to the root scroll container, thus we need to invoke
ScrollToVisual outside the walking up the tree loop.

This commit has two independent tests, a web platform test and a
mochitest. Unfortunately the web platform test doesn't work on Firefox,
since WebDriver (GeckoDriver) doesn't support touch action yet. It works
on Chrome. What the mochitest does is mostly equivalent with the web
platform test, but with nsIDOMWindowUtils.setResolutionAndScaleTo and
zoomToFocusedInput.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2249a0689109 Scroll visually to position:fixed element in ScrollFrameIntoView if necessary. r=dlrobertson
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/50475 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot

:hiro should this get an uplift for beta? Wondering if it's low risk and you mention it fixes Bug 1943053

Flags: needinfo?(hikezoe.birchill)

I think the change itself is low risk, but it's hard to predict whether there's no side-effect of this change or any other problems I am not aware of. In fact this bug was a long standing issue, but I had not been aware of it for years, bug 1931225 and bug 1916002 just revealed this bug.

Note that for bug 1943053, even if the chat box is covered by the software keyboard, users still can scroll to the box manually.

Flags: needinfo?(hikezoe.birchill)
Regressions: 1947223
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: