www.digitalcitizen.life - The scroll position resets to the top of the page when resizing the browser window size
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P3, Webcompat Score:2, firefox144 affected, firefox145 affected, firefox146 affected)
People
(Reporter: rbucata, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])
User Story
platform:windows,mac,linux impact:annoyance configuration:general affects:all branch:release diagnosis-team:apz user-impact-score:20
Attachments
(1 file)
|
4.22 MB,
video/mp4
|
Details |
Environment:
Operating system: Windows 10
Firefox version: Firefox 144.0
Steps to reproduce:
- Navigate to:https://www.digitalcitizen.life/minimize-maximize-apps-windows/
- Scroll a bit
- Resize the browser window size and observe
Expected Behavior:
The scroll position is mainly kept
Actual Behavior:
The scroll position is reset to the top
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/185682
| Reporter | ||
Comment 1•1 year ago
|
||
This happens because the page reloads when resizing the browser window, in both Chrome and Firefox, but Chrome kind of keeps the scroll position.
| Reporter | ||
Comment 2•1 year ago
|
||
| Reporter | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
So the page is just... reloading itself on resize. I don't know why either. It's doing that in Chrome, too, but Chrome is keeping the scroll position.
Comment 4•1 year ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=1f622156e9eab1d2c58d5d77bb5908fcc83db253&tochange=dbb8e4a9609d4531edb8d42898d897cc9df10fc6
So, this seems to be not a regression, but block Bug 1570566.
Comment 5•1 year ago
|
||
- When manually reloading the page without resizing, the scroll position appears to be preserved.
- However, when reloading via resizing in STR, the scroll position is not preserved.
Updated•11 months ago
|
Comment 6•11 months ago
|
||
It's not easy to diagnose. While I was wondering how Chrome handles this case, the site started blocking my request. I get "Exceeded the maximum number of page requests per minute for humans.".
Comment 7•10 months ago
|
||
The reason why we don't restore the scroll position is we get null history state here in nsDocShell::GetLayoutHistoryState after reloading.
It doesn't look apz related.
Updated•10 months ago
|
Comment 8•10 months ago
|
||
When the window gets resized, the following function is called.
function reloadPage() {
window.location.reload(true);
}
With the boolean argument we set LOAD_FLAGS_BYPASS_CACHE|LOAD_FLAGS_BYPASS_PROXY. That's the reason why we've lost the scroll position.
Updated•10 months ago
|
Updated•8 months ago
|
Description
•