From 29d24a5b8458a67456254a6b9bab83de408edd81 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 16 Jun 2019 15:42:29 +0200 Subject: Use activate_key for the tab, and chain up otherwise (#336) Chaining up in case of the web view can result in infinite recursion which continues so long as the web view has the focus. Fixes: #323 --- core/browser.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/browser.vala b/core/browser.vala index 27558715..9c149440 100644 --- a/core/browser.vala +++ b/core/browser.vala @@ -454,12 +454,16 @@ namespace Midori { if (is_locked) { return propagate_key_event (event); } + // Default behavior for standard widgets + if (!(get_focus () is WebKit.WebViewBase)) { + return base.key_press_event (event); + } // Give key handling in widgets precedence over actions // eg. Backspace in textfields should delete rather than go back if (propagate_key_event (event)) { return true; } - if (base.key_press_event (event)) { + if (activate_key (event)) { // Popdown completion if a key binding was fired navigationbar.urlbar.popdown (); return true; -- cgit v1.2.1