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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search: Auto focus input elements #61443
Conversation
Hello @ryantxu!
Please, if the current pull request addresses a bug fix, label it with the |
@@ -46,6 +46,7 @@ export const ManageDashboardsNew = React.memo(({ folder }: Props) => { | |||
value={state.query ?? ''} | |||
onChange={(e) => stateManager.onQueryChange(e.currentTarget.value)} | |||
onKeyDown={onKeyDown} | |||
// eslint-disable-next-line jsx-a11y/no-autofocus |
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.
this is the one on the list that seems debateable... but was already autoFocus 馃し
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.
lgtm. i'd remove the autoFocus
from DashboardSearchModal
as it's unnecessary. DashboardSearch
will get removed as soon as topnav is live anyway 馃檪
@@ -60,6 +60,8 @@ export function DashboardSearchModal({ isOpen }: Props) { | |||
tabIndex={0} | |||
spellCheck={false} | |||
className={styles.input} | |||
// eslint-disable-next-line jsx-a11y/no-autofocus | |||
autoFocus |
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.
this doesn't need autoFocus
, it already focuses when the modal is opened.
(cherry picked from commit ce3a96a)
Will this make it into the next 9.3.x release? This is a major annoyance for us too |
yes |
Fixes #59853 and https://github.com/grafana/support-escalations/issues/4793
Removing "autofocus" from everywhere caused the search pages to not let you start typing 馃槵