File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,12 @@ export class Blocked extends Component {
206206 width = { 400 }
207207 containerProps = { {
208208 className : 'unblock-dialog' ,
209+ // Handle ENTER keypress and close dialog
210+ onKeyDown : ( event ) => {
211+ if ( event . key === 'Enter' ) {
212+ this . unblock ( ) ;
213+ }
214+ }
209215 } }
210216 >
211217 < Pane width = "95%" margin = "auto" >
@@ -218,12 +224,6 @@ export class Blocked extends Component {
218224 selected : event . target . value ,
219225 } )
220226 }
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- } }
227227 />
228228 { this . state . unblockDialog . requirePassword ? (
229229 < PasswordPrompt
You can’t perform that action at this time.
0 commit comments