From ef7d9c01663dbb7ac1870430017c08e2598a8823 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Thu, 17 Nov 2022 10:22:35 -0500 Subject: [PATCH] LibGUI: Disallow shortcut propagation in Blocking modals and Popups This restriction is already present for mouse shortcuts but was forgotten in the recent key event refactor. --- Userland/Libraries/LibGUI/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp index 9f1945bb4d..6fa56a25ff 100644 --- a/Userland/Libraries/LibGUI/Window.cpp +++ b/Userland/Libraries/LibGUI/Window.cpp @@ -503,6 +503,9 @@ void Window::handle_key_event(KeyEvent& event) if (event.is_accepted()) return; + if (is_blocking() || is_popup()) + return; + // Only process shortcuts if this is a keydown event. if (event.type() == Event::KeyDown) propagate_shortcuts_up_to_application(event, nullptr);