On pages like translate.google.com where JavaScript changes the location hash
of the page, webkit performs nearly a new load of the page. This caused vimb
to switch from input to normal mode like intended if a form is submitted out
of input mode.
If only the location hash of a loaded page is changed, the used load-status
are WEBKIT_LOAD_COMMITTED and WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT. So
we can't switch to normal mode in load committed.
js_eval_file(ctx, vb.files[FILES_SCRIPT]);
}
- /* if we load a page from a submitted form, leave the insert mode */
- if (vb.mode->id == 'i') {
- mode_enter('n');
- }
-
vb_update_statusbar();
vb_update_urlbar(uri);
/* save the current URI in register % */
break;
case WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT:
+ /* if we load a page from a submitted form, leave the insert mode */
+ if (vb.mode->id == 'i') {
+ mode_enter('n');
+ }
break;
case WEBKIT_LOAD_FINISHED: