Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: prevent unwanted browser scrolling outside the desktop #1002

Open
wants to merge 1 commit into
base: releases/24.2
Choose a base branch
from

Conversation

bschwarzent
Copy link
Member

If a form is moved (partially) outside the desktop bounds and one of fields receives the focus, the browser will try to the field into view. This will happen even when the scrollbars are disabled (overflow: hidden), which is confusing for the user, because they cannot manually scroll back to the top. While the automatic scrolling can be prevented when setting the focus programmatically (preventScroll=true), the standard browser behavior for focusable fields cannot be changed.

By setting the overflow property to 'clip' instead of 'hidden', we can effectively disable the scrolling entirely for the desktop DIV. This does not affect the application (because scrolling is always done on inner components anyway) but prevents the browser from auto-scrolling the desktop to focused elements.

380833

If a form is moved (partially) outside the desktop bounds and one of
fields receives the focus, the browser will try to the field into view.
This will happen even when the scrollbars are disabled (overflow:
hidden), which is confusing for the user, because they cannot manually
scroll back to the top. While the automatic scrolling can be prevented
when setting the focus programmatically (preventScroll=true), the
standard browser behavior for focusable fields cannot be changed.

By setting the overflow property to 'clip' instead of 'hidden', we can
effectively disable the scrolling entirely for the desktop DIV. This
does not affect the application (because scrolling is always done on
inner components anyway) but prevents the browser from auto-scrolling
the desktop to focused elements.

380833
@bschwarzent bschwarzent self-assigned this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant