Skip to content

Commit

Permalink
fix(#103): register the onKeyDown event under the dialog container in…
Browse files Browse the repository at this point in the history
…stead of the RadioGroup
  • Loading branch information
AXeL-dev committed Sep 25, 2024
1 parent cd9e837 commit 6e226ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Blocked/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ export class Blocked extends Component {
width={400}
containerProps={{
className: 'unblock-dialog',
// Handle ENTER keypress and close dialog
onKeyDown: (event) => {
if (event.key === 'Enter') {
this.unblock();
}
}
}}
>
<Pane width="95%" margin="auto">
Expand All @@ -218,12 +224,6 @@ export class Blocked extends Component {
selected: event.target.value,
})
}
// Only Key Down event listener was added, to handle ENTER keypress and close dialog
onKeyDown={(event) => {
if (event.key === 'Enter') {
this.unblock();
}
}}
/>
{this.state.unblockDialog.requirePassword ? (
<PasswordPrompt
Expand Down

0 comments on commit 6e226ed

Please sign in to comment.