Page scrolls to top when page scroll bars are disabled.

RESOLVED WORKSFORME

Status

()

Core
Layout
RESOLVED WORKSFORME
8 years ago
4 years ago

People

(Reporter: Tony Kramer, Unassigned)

Tracking

({regression, testcase})

Trunk
x86_64
Windows Vista
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

If you disable the scroll bar on the page or on an element through JavaScript (to add an overlay with a status or something), the page or element resets its scroll position to the top of the page/element. Then once the scroll bars are restored, it does not restore the previous scroll position. This just recently started happening in Firefox (I didn't notice what version it first started occurring in, but I know it occurs in version 3.6). Previous versions of Firefox and other browsers keep the scroll position when the scroll bars are disabled on the page or on an element.

Reproducible: Always

Steps to Reproduce:
See the page in the link, it has instructions on how to reproduce the error. I have also attached the HTML file in case the link is no longer available.
Actual Results:  
The page/element has its scroll position set to the top of the page/element instead of preserving its scroll location.

Expected Results:  
The scroll location for the page/element should be preserved.

This bug can be worked around by caching the scroll position in JavaScript and then restoring it once the scroll bars are restored.
(Reporter)

Comment 1

8 years ago
Created attachment 433374 [details]
Test page from the link provided.
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a4pre) Gecko/20100318 Minefield/3.7a4pre

This is a regression from Firefox 3.5.
Component: General → General
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression, regressionwindow-wanted, testcase
Regression range:

works - "Show Overlay" retains position:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090511 Minefield/3.6a1pre
http://hg.mozilla.org/mozilla-central/rev/ff250122fa99

broken - "Show Overlay" scrolls to top:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090512 Minefield/3.6a1pre
http://hg.mozilla.org/mozilla-central/rev/ed38105c9c2a

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ff250122fa99&tochange=ed38105c9c2a
Keywords: regressionwindow-wanted
maybe an outcome of Bug 78070?
Severity: minor → normal
Component: General → Layout
QA Contact: general → layout
Changing the "overflow" property reframes the element.  For the root, this was indeed changed in bug 78070; for other things it's always been the case.

I believe we have existing bugs on not persisting scroll position across reframe.
Whiteboard: DUPEME

Updated

8 years ago
Blocks: 559791
Duplicate of this bug: 559791
Attached testcase works fine.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME

Updated

4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.