Closed Bug 1224307 Opened 8 years ago Closed 8 years ago

Page down scrolls too far on page with fixed position header/footer narrower than the viewport width


(Core :: Layout, defect)

Not set



Tracking Status
firefox45 --- fixed


(Reporter: mbrubeck, Assigned: mbrubeck)




(3 files)

Bug 780345 added heuristics to detect fixed-position headers and footers, and adjust page scrolling to correct for their height.

These heuristics are currently triggered only if the header or footer's is 100% the width of the scrollport.  This means that it does not work for pages with narrower headers or footers, including popular sites like and  This could be fixed by counting headers and footers whose width is greater than some percentage and/or absolute threshold.
Attached patch patchSplinter Review
This adjusts scrolling for any header whose visible rect is at least 50% of the scrollport width or at least 800px wide.  I chose these numbers more or less arbitrarily.   The absolute threshold is useful for sites like that have fixed-width headers (so on a very wide-screen display they may be only a small percentage of the viewport width).  The percentage threshold is useful for sites with "liquid" layouts when viewed on narrow screens.
Assignee: nobody → mbrubeck
Attachment #8686747 - Flags: review?(tnikkel)
Comment on attachment 8686747 [details] [diff] [review]

Seems reasonable. Thanks for the test too.
Attachment #8686747 - Flags: review?(tnikkel) → review+
Sweet!!  If/when there is a build available to try out, I'm definitely willing to test it.
Bug 1224307 - Fix page scrolling for non-full-width fixed headers/footers [r=tn]
Bug 1224307 - Fix page scrolling for non-full-width fixed headers/footers [r=tn]
I tried to give this a test run on, using this build:

Hopefully that one includes this patch.  Anyway, for NYTimes, the scrolling behavior seems to be not improved compared to Firefox Beta.  When the window height is ~850 pixels or less, page down scrolling behaves as expected.  But with the window height at ~900 pixels or more, page down scrolling still scrolls too far.  I think the difference is that with a taller window, NYTimes shows an extra header at the top with links to other articles; maybe that isn't being factored in to the calculation.  I will attach screenshots.
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
> NYTimes including extra toolbar at top; page down scrolling still broken

Could you file a new bug for this please? It looks like some additional fix might be needed for If someone can make a reduced test case, that would also help.  Thanks!
I filed Bug 1225201 for the issue.  Unfortunately I do not have time to try to figure out a reduced test case right now.  Thanks again!
You need to log in before you can comment on or make changes to this bug.