-
Notifications
You must be signed in to change notification settings - Fork 71
Firefox: Visual glitches are triggered by the scrolling attempt, when the overlays that lock scrolling position are opened. #266
Comments
This cannot be reproduced in Firefox 58.0.2 for Mac OS 10.13.3 (17D47), will try on windows soon |
Note: reproducing this requires a heavy page like Youtube, which keeps the browser's main thread busy enough. It helps (to repro the issue) to open the overlay and try to scroll quickly after loading the page, while some content on the page (e.g. comments) is still being loaded. |
Thanks @theres-waldo! I've written a simpler repro that creates jank on the main thread, and now I can repro on firefox for mac too: http://jsbin.com/jaqeyo/1/edit?html,output |
I'll investigate if it's possible to do something about it, but I'm not confident there is much to do.
The fact that the main thread is busy makes the scroll position restoration more visible. Would it be an option to use another action on scroll? iron-overlay-behavior can also close the overlay on scroll for you, using |
The suggestion I made in the Firefox bug where this came up, is to lock scrolling by making the page |
@theres-waldo that would cause layout changes on browsers that apply an offset when the scrollbar is shown vs not, e.g. in IE11 toggling overflow:hidden/auto would add/remove 20px to the width if the page is vertically scrollable. |
Is that a concern because of the performance impact of the re-layout? Or because the change to the layout might be visually jarring to the user? (I expect a scrollbar-width amount of change is unlikely to change the layout in any significant way, but you can probably construct a page where it does...) |
Basically, all of the above. This approach was introduced here PolymerElements/iron-dropdown#93 |
How involved would it be, to use the |
I don't think there is a silver bullet for this one. We thought of solutions like adding an element to the dom just to measure the scrollbar width (e.g. https://davidwalsh.name/detect-scrollbar-width), but that causes layout/paint on the whole document, and potentially triggers mutation observers, and it would be leaking implementation details. I'll leave it to the owners (@bicknellr fyi) to decide on this one (I'm not maintaining the repo anymore). Probably this can be fixed at the app level by settings overflow: hidden when any scroll-blocking dialog/dropdown is opened. |
Description
Open overlay that locks scroll position in Firefox. Try scrolling with scrollbar. Details here https://bugzilla.mozilla.org/show_bug.cgi?id=1438514#c5.
Expected outcome
Nothing happens
Actual outcome
Visual glitches are triggered by the scrolling attempt.
Live Demo
See attachment here https://bugzilla.mozilla.org/show_bug.cgi?id=1438514
Browsers Affected
The text was updated successfully, but these errors were encountered: