Skip to content

Plot dependent on and above input causes focus shift when adjusting the input #1936

Answered by Fil
roualdes asked this question in Q&A
Discussion options

You must be logged in to vote

When a node is refreshed, framework removes it from the DOM and replaces it with the new version. Webkit reflows the page in-between for some reason, and suddenly the bottom of the page is in the viewport, which makes it scroll down.

You can mitigate the issue by adding a div at the bottom of the page:

<div style="min-height: 100vh"></div>

alternatively, a style on the body with e.g. body {margin-bottom: 500px}. (I'm not sure about the size we want, btw; should be a lot.)

In both cases it adds some white space at the bottom, which might not be ideal. Maybe we could find a better solution that suits everyone and add it to framework?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Fil
Comment options

Fil Feb 28, 2025
Collaborator

Answer selected by roualdes
@roualdes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants