Skip to content

Commit

Permalink
Autofocus delete tag button in when dialog opens (#2775)
Browse files Browse the repository at this point in the history
This puts focus on the delete tag button when the dialog is opened and allows you to hit return/enter on the keyboard to confirm the deletion.
  • Loading branch information
sandymcfadden authored Mar 17, 2021
1 parent 09b8934 commit 4f4e10b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/dialogs/trash-tag-confirmation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const TrashTagConfirmation: FunctionComponent<Props> = ({
</div>
<div className="dialog-buttons">
<button
autoFocus
className="button-primary delete-tag"
onClick={() => trashTag(tagName)}
>
Expand Down

0 comments on commit 4f4e10b

Please sign in to comment.