WebKitHitTestResult *result = webkit_web_view_get_hit_test_result(webview, event);
g_object_get(result, "context", &context, NULL);
- if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
+ if (vb.mode->id == 'i' && !(context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE)) {
+ /* make sure we leave insert mode if the user click on a none editable
+ * element - make sure the click is processed by webkit for example if
+ * it ws a link */
+ mode_enter('n');
+ propagate = false;
+ } else if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
if (event->button == 2 || (event->button == 1 && event->state & GDK_CONTROL_MASK)) {
/* ctrl click or middle mouse click onto link */
Arg a = {VB_TARGET_NEW};