diff --git a/src/components/Blocked/index.jsx b/src/components/Blocked/index.jsx index f68954d..1bd12d0 100644 --- a/src/components/Blocked/index.jsx +++ b/src/components/Blocked/index.jsx @@ -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(); + } + } }} > @@ -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 ? (