Closed
Bug 1154193
Opened 10 years ago
Closed 2 years ago
scrollTop on document.body when it is display:none should work
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox40 | --- | affected |
People
(Reporter: zcorpan, Assigned: smaug)
References
Details
In quirks mode, when "the body element" is display:none, setting scrollTop on it should scroll the viewport. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3497 <!-- quirks --> <head style="display:block; height:1000px; background:url(image) no-repeat center center"> <body style="display:none" onload="document.body.scrollTop = 400"> This should work per spec and it does in other browsers. We could change the spec but I don't see that it is obviously wrong to have a display:none body still work as a controller for the viewport.
![]() |
||
Updated•10 years ago
|
Flags: needinfo?(roc)
![]() |
||
Comment 1•10 years ago
|
||
In standards mode, should this also work if the documentElement is display:none? I guess that's not really detectable...
Reporter | ||
Comment 2•10 years ago
|
||
Yeah, I think you can't scroll if the root is display:none.
![]() |
||
Comment 3•9 years ago
|
||
Olli, does the scrollingElement stuff fix this too, or does this need a separate fix?
Flags: needinfo?(bugs)
Flags: needinfo?(roc)
Comment 6•2 years ago
|
||
This was fixed by something in this range, likely bug 1364360, please correct the dependencies if I am wrong, thanks!
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=291a11111bdd05c5cd55dd552da4b1285ceba9b2&tochange=9104506c0a5eaac89b6c22c804c83ccee7d6e662
You need to log in
before you can comment on or make changes to this bug.
Description
•