ShortcutRegistration - does not work in modal dialoges

UI.getCurrent().addShortcutListener() does not work if a modal dialog is opened. By setting to “modal = false” everything works as expected, but this results in negative aspects, because it is still possible to press buttons behind the dialog.
Is there a way to handle this?

You need to scope the shortcut listener to your dialog / components within the dialog. Anything (even shortcuts) behind the dialog are blocked because of modality therefore it has to be added within the dialog.

2 Likes

Perfect - is working fine, thank you!