From ddb7e585de11a97460cc56d25aef0651a7cf682f Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Fri, 3 Apr 2015 23:15:48 +0200 Subject: [PATCH] Leave input mode after submitting a form (#197). This is required in cases where no focus/blur events are triggered after a form was submitted. Else we'd end up with vimb keeping in input mode but none focused editable element. --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index cb0b807..7f7168a 100644 --- a/src/main.c +++ b/src/main.c @@ -759,6 +759,10 @@ static void webview_load_status_cb(WebKitWebView *view, GParamSpec *pspec) uri = webkit_web_view_get_uri(view); autocmd_run(AU_LOAD_FIRST_LAYOUT, uri, NULL); #endif + /* if we load a page from a submitted form, leave the insert mode */ + if (vb.mode->id == 'i') { + vb_enter('n'); + } break; case WEBKIT_LOAD_FINISHED: -- 2.20.1