Skip to content

Keyboard Navigation

Esc goes to the innermost thing first. An open dialog or menu closes before anything else. Text in a search field is cleared before the page reacts.

WhereKeyWhat happens
a dialog, an alert dialog, a dropdown menuEscit closes. Nothing else happens
a list’s search field, with textEscthe text is cleared. The search row stays open
a pantry list in Select modeEscSelect mode ends, when no dialog, menu or search text used the key. The focus goes to the Select toggle
a pantry list in Select modeCancelthe same as Esc

In code, a handler that uses Esc calls event.preventDefault(). A page-level Esc handler checks event.defaultPrevented first, and ignores an Escape with event.isComposing (it ends an input method composition). See List Toolbars.