diff options
author | Klaus von der Heyde <39677540+asc-soc@users.noreply.github.com> | 2019-09-16 19:23:00 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2019-09-16 19:23:00 +0200 |
commit | 0115b02f43d23612366d0c5063e6b314d04e3853 (patch) | |
tree | d9769f6ceddaf881f67663d303874a62025b19f1 | |
parent | e68be73a19b4d2b3f9f9d40f2cded3a78ef0a74a (diff) | |
download | midori-git-0115b02f43d23612366d0c5063e6b314d04e3853.tar.gz |
Added special handling when Midori.Urlbar is in focus (#366)
If the urlbar has focus and reacts on the event, stop further handling. This enables ^N and ^T again, as the edit field does not handle them. Any key binding in the edit field takes precedence.
Fixes: #364
-rw-r--r-- | core/browser.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/browser.vala b/core/browser.vala index 3ce21e40..503aa301 100644 --- a/core/browser.vala +++ b/core/browser.vala @@ -454,6 +454,12 @@ namespace Midori { if (is_locked) { return propagate_key_event (event); } + // Default behaviour for navigation bar + if (get_focus () is Midori.Urlbar) { + if (navigationbar.urlbar.key_press_event (event)) { + return true; + } + } // Default behavior for standard widgets if (!(get_focus () is WebKit.WebViewBase)) { return base.key_press_event (event); |