Don't switch from pass through by click into input field nor by a reload of the
page with a focused input field.
static gboolean auto_insert(Element *element)
{
- if (dom_is_editable(element)) {
+ /* don't change mode if we are in pass through mode */
+ if (vb.mode->id != 'p' && dom_is_editable(element)) {
mode_enter('i');
return true;
js_eval_file(ctx, vb.files[FILES_SCRIPT]);
}
- /* if we load a page from a submitted form, leafe the insert mode */
+ /* if we load a page from a submitted form, leave the insert mode */
if (vb.mode->id == 'i') {
mode_enter('n');
}
propagate = true;
}
- } else if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) {
+ } else if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE && 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 */
mode_enter('i');
propagate = true;
}