Closed Bug 1224307 Opened 6 years ago Closed 6 years ago
Page down scrolls too far on page with fixed position header/footer narrower than the viewport width
2.77 KB, patch
|Details | Diff | Splinter Review|
414.07 KB, image/png
915.60 KB, image/png
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 arstechnica.com and nytimes.com. This could be fixed by counting headers and footers whose width is greater than some percentage and/or absolute threshold.
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 arstechnica.com 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
Status: NEW → ASSIGNED
Attachment #8686747 - Flags: review?(tnikkel)
Comment on attachment 8686747 [details] [diff] [review] patch 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.
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd0be67d2344a24b6dae7cb91c03138703ca46c6 Bug 1224307 - Fix page scrolling for non-full-width fixed headers/footers [r=tn]
https://hg.mozilla.org/integration/mozilla-inbound/rev/731ca2fd1aeca2617450eadbe6b79413160b28b4 Bug 1224307 - Fix page scrolling for non-full-width fixed headers/footers [r=tn]
I tried to give this a test run on nytimes.com, using this build: http://firstname.lastname@example.org/try-macosx64-debug/firefox-45.0a1.en-US.mac64.dmg 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.
> 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 nytimes.com. If someone can make a reduced test case, that would also help. Thanks!
I filed Bug 1225201 for the nytimes.com 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.