Skip to content

Commit

Permalink
shell: Disable no-autofocus rule
Browse files Browse the repository at this point in the history
We need to focus password input first. There are no active elements
preceding this input.

Fixes cockpit-project#12954
  • Loading branch information
marusak committed Jan 20, 2022
1 parent 2c1d8b6 commit 5608bca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
"space-before-function-paren": "off",
"standard/no-callback-literal": "off",

"jsx-a11y/no-autofocus": "off",

"eqeqeq": "off",
"import/no-webpack-loader-syntax": "off",
"object-property-newline": "off",
Expand Down
2 changes: 1 addition & 1 deletion pkg/shell/superuser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UnlockDialog extends React.Component {
validated={!state.error ? "default" : validated || "error"}
>
<TextInput
autoFocus
autoFocus // eslint-disable-line jsx-a11y/no-autofocus
id="switch-to-admin-access-password"
isDisabled={state.busy}
onChange={state.change}
Expand Down

0 comments on commit 5608bca

Please sign in to comment.