root-scroller icon indicating copy to clipboard operation
root-scroller copied to clipboard

Implicit root scroller was unexpected

Open jakearchibald opened this issue 6 years ago • 1 comments

On https://proxx.app, the URL-hiding behaviour was unwanted during games because the viewport height only changes once the URL bar is fully hidden/shown. This causes anything fixed to the bottom of the viewport to snap around in a really ugly way.

Sometimes this is acceptable for content sites, but in the game, scrolling up & down would happen frequently, and the viewport size changing became disruptive, or worse, resulted in controls being outside the visible viewport.

We tried to fix it by creating a different element for the scrolling, but since it was full size, we ran into implicit root scrolling. In the end, we worked around it by making the scrolling element 1px less than full size.

It feels like there should be a less hacky way around this. Maybe a way to prevent the URL bar hiding regardless of which element is scrolling?

jakearchibald avatar Sep 06 '19 16:09 jakearchibald

Yeah, there's definitely cases where it shouldn't activate. However, I'm a bit confused why the URL bar was hideable at all; normally the page has to have scrollable overflow or else the URL bar won't be movable. I'd imagine in a game (indeed, in proxx.app) I don't imagine there to be overflow. Do you know what was happening there? Perhaps there was some unintended overflow that allowed some movement?

Is there a test-URL or some small changes I can make in dev tools to see the problem myself?

bokand avatar Sep 06 '19 17:09 bokand