Consider scrolling visually to position:fixed descendants on scrollIntoView call
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
Attachments
(2 files)
While I was trying to understand what's going on bug 1946409 case, I realized bug 1943865 wasn't sufficient for some cases.
For example, if the target element of scrollIntoView call is inside a tall position:fixed element, say, its height is 100vh and the document is scaled down by 2.0x or some. Then the target element will never be scrolled into the visual viewport.
Attaching file is an example. If you open the example in RDM and click the "scrollIntoView" button, nothing will happen. It should be scrolled to the blue banner at the bottom of the page. You can see the expected result on Chrome RDM.
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Comment 1•5 months ago
|
||
It turned out the height of the position:fixed element doesn't matter here. A problem is that the target element is inside nested position:fixed elements.
Assignee | ||
Comment 2•5 months ago
|
||
While we are walking up the frame tree during for calculating the frame
bounds, there are cases that we reach to the top viewport frame. Thus
when we walk up the frame tree to invoke ScrollToShowRect for each
scroll container, we fail the check introduced in bug 1943865.
Just like we did in bug 1943865, this commit has also two tests, one is
a web platform test, the other is a mochitest. But unlike bug 1943865,
the mochitest in this commit doesn't use zoomToFocusedInput since
zoomToFocusedInput ends up calling another
PresShell::ScrollFrameIntoView call via Selection::ScrollIntoView [1], which
wallpapers this bug, i.e the mochitest will get pass without this proper
fix.
Updated•5 months ago
|
Comment 3•4 months ago
|
||
The severity field is not set for this bug.
:hiro, could you have a look please?
For more information, please visit BugBot documentation.
Comment 5•4 months ago
|
||
bugherder |
Assignee | ||
Updated•4 months ago
|
Description
•