Key presses triggering events in background despite modal being open

Hi there!

I’m running into an issue where, when I have a dialog window open, pressing ESC or Enter triggers events in the background instead of within the modal itself.

Is there a way to set key binding priority to an open dialog?

can you show some code?

and which Vaadin version are you using?