1

How to close and Ext JS Dialog on ESC key using modern toolkit?

Dialog does not close on ESC key.

Steps:

1 - after opening press ESC key

Result Expected Dialog should closed

Test case Fiddle

Seems to be a focus issue.

1 Answers1

3

Dialogs are not focusable by default so keyboard input wont take affect until you add a focusable item or make it self focusable.

to complete, you should also use tabIndex as -1 to do the trick.

Solved it adding 2 configs on Dialog.

focusable: true,
tabIndex: -1

Thank you Guilherme Portela for helping