Scroll position is lost on reflow with large enough scroller.
Categories
(Core :: Layout: Scrolling and Overflow, defect, P2)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
References
()
Details
(Keywords: regression, Whiteboard: [webcompat:p1])
Attachments
(2 files)
|
710 bytes,
text/html
|
Details | |
|
Bug 1526609 - When interrupting the reflow of abspos kids, still account for the old overflow areas.
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
|
Details | Review |
STR:
- Open the test-case.
- Scroll somewhere down the middle.
- Resize the window.
Expected:
- Scroll position isn't lost.
Actual:
- Scroll jumps to the top.
This is the root cause of https://github.com/webcompat/web-bugs/issues/22588.
The amount of content does matter, apparently.
| Assignee | ||
Comment 1•6 years ago
|
||
Will take a closer look on Monday. If someone could run a regression range it'd be lovely, just to confirm whether it's a regression or not.
| Assignee | ||
Comment 2•6 years ago
|
||
Seems to happen only when shrinking, which probably means that this is related to us switching scrollbar choice between choosing only vertical scrollbars or both scrollbars.
This is probably what can cause the issue with flex layouts more easily. It's easy to imagine a flex item that doesn't get a vertical scrollbar when measured and does on the final reflow, or something of that sort.
Comment 3•6 years ago
|
||
mozregression gave me this:
16:19.13 INFO: Last good revision: 7efda263a842e60cd0cc00b3c4a7058c65590702 (2017-06-08)
16:19.13 INFO: First bad revision: f4262773c4331d4ae139be536ce278ea9aad3436 (2017-06-09)
Nothing is standing out as obvious in there.
Comment 4•6 years ago
|
||
OK, git bisect leads me to believe the regression was introduced in bug 1370072.
| Assignee | ||
Comment 5•6 years ago
|
||
Huh, what? That is quite surprising.
| Assignee | ||
Comment 7•6 years ago
|
||
Otherwise, if we're scrolled, the scroll frame will think that our scroll range
was reduced, which will in turn clamp the scroll position, which is not good.
I... don't really know how to add a test for this interruptible reflow stuff.
Ideas?
Comment 8•6 years ago
|
||
Updated•6 years ago
|
| Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8)
Possibly useful: https://searchfox.org/mozilla-central/rev/5e3bffe964110b8d1885b4236b8abd5c94d8f609/gfx/layers/apz/test/mochitest/test_interrupted_reflow.html#619-626
Thanks! I managed to get a regression test working cargo-culting from that one :)
| Assignee | ||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 12•6 years ago
|
||
Comment on attachment 9042970 [details]
Bug 1526609 - When interrupting the reflow of abspos kids, still account for the old overflow areas.
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
N/A
User impact if declined
Scroll position is lost sometimes. This affects outlook.com.
Is this code covered by automated tests?
Yes
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
Yes
If yes, steps to reproduce
See STR in https://github.com/webcompat/web-bugs/issues/22588.
List of other uplifts needed
None
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
Pretty low-risk / simple fix to avoid loosing the scroll range if our reflow gets interrupted.
String changes made/needed
none
Updated•6 years ago
|
Updated•6 years ago
|
Comment 13•6 years ago
|
||
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:67.0) Gecko/20100101 Firefox/67.0
Build ID: 20190220040540
The issue is not completely fixed. After scrolling to the middle of the page and resizing the window, the scroll position is moved at the middle of the distance between the beginning of the page and the previous position of the scroll.
Please note that the second part of the issue is fixed. When the window is resized back to the default size, the scroll position goes back to the middle of the page.
| Assignee | ||
Comment 14•6 years ago
|
||
It is expected that the exact element that is at the scroll position isn't preserved. The scroll distance from the top is what's preserved, and when you shrink the window that scroll position ends up pointing somewhere in the middle.
Of course, if you enlarge the window again the scroll position should be roughly the same again, can you confirm that's what happens?
Comment 15•6 years ago
|
||
It's not about the scroll position that isn't preserved, the position of the content from the page is not preserved.
I've tried a different STR:
- Scroll to the end of the page and notice that the background is green.
- Resize the browser window to half.
- Notice that the scroll position is at the middle of the page and the background is red now.
Could you confirm that this is the expected behavior?
And yes, I can confirm that when the window is enlarged to the default size, the scroll position and the content position are the same again.
| Assignee | ||
Comment 16•6 years ago
|
||
Yes, that's expected. What wouldn't be expected is that position goes back to zero and doesn't go back to the original position when you resize back.
Comment 17•6 years ago
|
||
Verified as fixed on the latest Nightly build based on Comment 16.
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Comment on attachment 9042970 [details]
Bug 1526609 - When interrupting the reflow of abspos kids, still account for the old overflow areas.
Fix for a scroll position issue, verified in nightly.
let's uplift for beta 11.
Comment 19•6 years ago
|
||
| bugherder uplift | ||
Updated•6 years ago
|
Comment 20•6 years ago
|
||
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:66.0) Gecko/20100101 Firefox/66.0
Build ID: 20190225143245
Verified as fixed on the latest Beta build (66b11).
Updated•6 years ago
|
Description
•