From ac94602e124b0136eea5d5b723a1c495f3d856b3 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 6 Apr 2015 22:09:48 +0200 Subject: [PATCH] Removed code to track clicks to input elements. This was added to switch between input mode and normal mode, depending on the clicked element. But the mode switching is done mainly by observing DOM focus/blur events. So this duplicate logic become obsolete. --- src/main.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main.c b/src/main.c index 7f7168a..5b2d701 100644 --- a/src/main.c +++ b/src/main.c @@ -1330,22 +1330,6 @@ static gboolean button_relase_cb(WebKitWebView *webview, GdkEventButton *event) vb_load_uri(&a); nopropagate = true; - } else if (vb.mode->id != 'p') { - /* don't switch back to input mode if we are currently in pass through - * mode when the user clicks into a form field */ - if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE - || dom_is_editable(dom_get_active_element(vb.gui.webview)) - ) { - /* If click to editable elemen or if the focus is on an editable - * element after a click - switch to insert mode. The later is - * used for WYSIWYG editors where the click runs into a div and - * not the editable element itself. */ - vb_enter('i'); - } else if (vb.mode->id == 'i' || vb.mode->id == 'c') { - /* make sure we leave insert mode or command/hint mode if the user - * click on a none editable element */ - vb_enter('n'); - } } g_object_unref(result); -- 2.20.1