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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase (deleted) —
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.)
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?
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.)
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.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Attachment #8686852 - Flags: review?(tnikkel)
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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/13335ded96b921704816cb491a38c2b45dc8f94f Bug 1081272 - Include position and transform when computing header/footer size [r=tn]
https://hg.mozilla.org/integration/mozilla-inbound/rev/31f4f85705940ed59a4ca0672907c148e5e8e781 Bug 1081272 - Include position and transform when computing header/footer size [r=tn]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: