summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2018-11-19 08:39:58 +0200
committerGitHub <noreply@github.com>2018-11-19 08:39:58 +0200
commit21e659c71e003bde8a8ffbdf10a32a99ce92985e (patch)
tree8789cd6ef62c494430a6ee937140007428df1cfb
parentb286e21c25f76e2380603039463ddea5e698ab15 (diff)
downloadmidori-git-21e659c71e003bde8a8ffbdf10a32a99ce92985e.tar.gz
Don't block regular key input in app mode (#167)
Also allow editable context menus. Fixes: #152
-rw-r--r--core/browser.vala2
-rw-r--r--core/tab.vala8
2 files changed, 5 insertions, 5 deletions
diff --git a/core/browser.vala b/core/browser.vala
index 7febd032..77a48763 100644
--- a/core/browser.vala
+++ b/core/browser.vala
@@ -307,7 +307,7 @@ namespace Midori {
public override bool key_press_event (Gdk.EventKey event) {
// No keyboard shortcuts in locked state
if (is_locked) {
- return true;
+ return propagate_key_event (event);
}
// Give key handling in widgets precedence over actions
// eg. Backspace in textfields should delete rather than go back
diff --git a/core/tab.vala b/core/tab.vala
index 567ec36c..79602e1f 100644
--- a/core/tab.vala
+++ b/core/tab.vala
@@ -222,15 +222,15 @@ namespace Midori {
public override bool context_menu (WebKit.ContextMenu menu,
Gdk.Event event, WebKit.HitTestResult hit) {
+ if (hit.context_is_editable ()) {
+ return false;
+ }
+
// No context menu for pinned tabs
if (pinned) {
return true;
}
- if (hit.context_is_editable ()) {
- return false;
- }
-
bool clear = hit.context_is_link ()
|| hit.context_is_image ()
|| hit.context_is_media ()