0114-WebUI-Improvement-Keyboard-Scroll-Control-After-Page-Change #1144
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To allow easier WebUI handling with keyboard (e.g. Scrolling), on page change now the main content area get's focussed if at that time no other element has the focus.
Steps needed:
#content
container focusable#content
on page changeTo prevent any bad stylings due to focus by chromes default outlining of focus elements this is now disabled for the
#content
container.Related Issue
This resolves #904
Types of changes
Alternate Designs
As an alternative one could capture keypresses like PageUp/-Down on the body element and perform scroll actions by script.
But imo we should rely on default browser behavior instead of recreating it.
That's why I prefer giving focus to the (scrollable) content element if at that time no other field has focus.
Possible Drawbacks
Only imaginable drawback are some keyboardevents which now trigger first on the
#content
container before bubbling to the body and document. But I highly doubt that.Verification Process
While switching to different views and focussing some input fields I noticed no change in behavior (as expected). While at the same time, wherever the
#content
area had a scrollbar I was able to scroll it by keyboard, without clicking beforehand.Release Notes
Directly enabling Keyboard Controls (like Scrolling) on page changes
Contributing checklist