Closed
Bug 1081272
Opened 10 years ago
Closed 9 years ago
Page down scrolls too far on page with fixed header with a transform
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
(Keywords: testcase)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
Bug 780345 added heuristics to detect fixed-position headers, and adjust page scrolling to correct for their height.
A recent version of http://www.metafilter.com/ has a toggleable fixed-position header that is not detected by the current heuristics. The attached test case demonstrates the problem. Instead of "top: 0" the header has a negative "top" value, and when the "visible" class is applied it adds a transform to bring the header into view.
(The deveolper of the site is working on a workaround for this, so the live site might not have this bug if you look at it later. See the reduced test case instead.)
Comment 2•9 years ago
|
||
I noticed that NYTimes articles have a similar issue. E.g., see this page:
http://www.nytimes.com/2015/11/15/travel/denver-airport-kim-day.html?_r=1
(Page scrolling is also broken in Chrome and Safari on Mac for that page.) Is that an instance of this bug, or should I file a new one?
Assignee | ||
Comment 3•9 years ago
|
||
The nytimes.com and lteforum.at bugs seem to be different from this one. Those both have the "top" property set to 0 for the headers.
The Arstechnica one is similar to this issue. It has a negative "top", but no transform. (The header element is just partly off-screen.)
Assignee | ||
Comment 4•9 years ago
|
||
I think the nytimes, lteforum, and arstechnica bugs are all caused because their headers don't span 100% of the page width. I filed bug 1224307 for this.
Assignee | ||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment on attachment 8686852 [details] [diff] [review]
patch
>+ nsRect r = f->GetRect();
>+ r -= f->GetOffsetTo(aViewportFrame);
You can just use f->GetRectRelativeToSelf().
Thanks!
Attachment #8686852 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/13335ded96b921704816cb491a38c2b45dc8f94f
Bug 1081272 - Include position and transform when computing header/footer size [r=tn]
Comment 8•9 years ago
|
||
Assignee | ||
Comment 9•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/31f4f85705940ed59a4ca0672907c148e5e8e781
Bug 1081272 - Include position and transform when computing header/footer size [r=tn]
Comment 10•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•