Closed Bug 811301 Opened 12 years ago Closed 12 years ago

setting html {overflow:hidden} resets window scroll position

Categories

(Core :: Layout, defect)

16 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: zack, Assigned: roc)

References

(Depends on 1 open bug)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11

Steps to reproduce:

Firefox v16.0.2

to reproduce: 

- set (with css) html {overflow-y:scroll} because we want to force vertical scroll bars 
- set (with js) style="overflow:hidden;" (also tested style="overflow-y:hidden;") on the html element, because we are opening a dialog and want to disable scrolling.

- firefox resets vertical window scroll position to top, and window.scrollTop to 0. (And does not fire a window.scroll event - although I wouldnt necessarily expect the event, since I believe this behaviour to be a bug.)

scroll position should not change. 

for correct behaviour see IE8, IE9, Chrome (latest: 23.0.x), Safari (latest: 6.0)


Actual results:

- firefox resets vertical window scroll position to top, and window.scrollTop to 0. (And does not fire a window.scroll event - although I wouldnt necessarily expect the event, since I believe this behaviour to be a bug.)


Expected results:

scroll position should not change. 

for correct behaviour see IE8, IE9, Chrome (latest: 23.0.x), Safari (latest: 6.0)
Could you provide a minimized test case?
Component: Untriaged → Layout
Product: Firefox → Core
Robert, should be be resetting scroll position to 0 when switching to hidden?  Or is it an artifact of the reframe?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #681220 - Flags: review?(matspal) → review+
Attachment #681221 - Flags: review?(matspal) → review+
Comment on attachment 681225 [details] [diff] [review]
Part 3: Cleanup presshell code now that we don't do special state save/restore for the root scroll frame

Nice cleanup.
Attachment #681225 - Flags: review?(matspal) → review+
Blocks: 819779
Depends on: 842853
Depends on: 851445
Depends on: 1328052
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: