Unwanted scroll to top in Webkit browsers #147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am attaching an example below that shows the bug. Here is how to reproduce:
Some of the factors that seems to influence this behavior.
The problem appears to be your absolutely positioned body in combination with some webkit scrolling bug (the textarea is still positioned correctly, and is being scrolled out of view by webkit). This is a rather pathological case, and I don't have time to look into this further at the moment.
Thanks for looking into this. It looks like there are some deeper bugs in the way browsers and handling the flexible box model in situations like this. I have refactored my code and am able to avoid the issue completely. This can be closed.
I was experiencing a similar issue when using CSS Grid. For anyone arriving at this later, here's what fixed it for me in case it saves others some time.
I had the following HTML structure. Details omitted for brevity.
Not exactly sure what was the issue, but the fix was pretty simple. I just added
position: absoluteto the parent element of the CodeMirror instance (<div class="container"/>):