summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2019-06-16 15:42:29 +0200
committerGitHub <noreply@github.com>2019-06-16 15:42:29 +0200
commit29d24a5b8458a67456254a6b9bab83de408edd81 (patch)
tree1f913dbec6733a5769acfbd3a4499e5554a4df31
parentb925d7701e162f66d51b8366fc743571c953a98c (diff)
downloadmidori-git-29d24a5b8458a67456254a6b9bab83de408edd81.tar.gz
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
-rw-r--r--core/browser.vala6
1 files changed, 5 insertions, 1 deletions
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;