-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Fix scrolling with keyboard #10054
Fix scrolling with keyboard #10054
Conversation
42ec5d5
to
fab3078
Compare
@@ -81,7 +81,7 @@ export default function makeKeyboardNavigable( | |||
} | |||
|
|||
function scrollAndSelect(selectedItem, selectedClass, items) { | |||
if (selectedItem !== null) { | |||
if (selectedItem) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not strictly needed now but its more resilient
@@ -32,6 +32,8 @@ function init() { | |||
searchResultsContainer, | |||
() => searchResults.querySelectorAll("a"), | |||
hoverClass, | |||
() => {}, | |||
() => commandPalette.open, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only enables the keyboard navigation when the dialog is open which fixes it
@@ -32,6 +32,8 @@ function init() { | |||
searchResultsContainer, | |||
() => searchResults.querySelectorAll("a"), | |||
hoverClass, | |||
() => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would have been nicer if this was being passed an object so as I didn't have to pass this as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big thanks :) LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should fix the issue
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
See JENKINS-74984
#7569 (comment)
Testing done
Pressed up and down in system message text field, no console message
Scrolled the system configuration page, before fix didn't scroll, after fix scrolled.
Opened command palette, searched, used keyboard to navigate results
Closed command palette, can still scroll page with keyboard
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist