From fcf70aa021cc189cb5aaf3f712a2dbb6cf8e5e07 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 1 Feb 2022 14:31:37 +0100 Subject: [PATCH] modalDialog: Ensure to let focus manager handle key events Since the grab no longer lets events bubble up to the stage unstopped, we should be forwarding the key events that bubbled up to the dialog to maybe cycle focus. Fixes focus cycling on keyboard navigation inside dialogs. Part-of: --- js/ui/modalDialog.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 259a9c6bb..607000b35 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -101,6 +101,13 @@ var ModalDialog = GObject.registerClass({ this.notify('state'); } + vfunc_key_press_event() { + if (global.focus_manager.navigate_from_event(Clutter.get_current_event())) + return Clutter.EVENT_STOP; + + return Clutter.EVENT_PROPAGATE; + } + clearButtons() { this.dialogLayout.clearButtons(); }