Skip to content

Commit cd9e837

Browse files
authored
Merge pull request #104 from itSarthak/enter-keypress-added-unblock-dialog
this commit fixes issue #103
2 parents 148ef43 + 3605c05 commit cd9e837

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/Blocked/index.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ export class Blocked extends Component {
218218
selected: event.target.value,
219219
})
220220
}
221+
// Only Key Down event listener was added, to handle ENTER keypress and close dialog
222+
onKeyDown={(event) => {
223+
if (event.key === 'Enter') {
224+
this.unblock();
225+
}
226+
}}
221227
/>
222228
{this.state.unblockDialog.requirePassword ? (
223229
<PasswordPrompt

0 commit comments

Comments
 (0)