From 1ed2760de23e4f92028dadf7b5742cfef2090557 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 10 Nov 2014 00:36:39 +0100 Subject: [PATCH] Don't switch to input mode on click to radio button. If a radio button was clicked vimb switched to input mode. Now the logic what element is editable is consistent within dom.c. Editable are textarea, and input elements without any type a and type text or password. --- src/dom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dom.c b/src/dom.c index 49c3d91..bd6f6a5 100644 --- a/src/dom.c +++ b/src/dom.c @@ -124,12 +124,12 @@ gboolean dom_is_editable(Element *element) tagname = webkit_dom_element_get_tag_name(element); type = webkit_dom_element_get_attribute(element, "type"); + /* element is editable if it's a text area or input with no type, text or + * pasword */ if (!g_ascii_strcasecmp(tagname, "textarea")) { result = true; } else if (!g_ascii_strcasecmp(tagname, "input") - && g_ascii_strcasecmp(type, "submit") - && g_ascii_strcasecmp(type, "reset") - && g_ascii_strcasecmp(type, "image") + && (!*type || !g_ascii_strcasecmp(type, "text") || !g_ascii_strcasecmp(type, "password")) ) { result = true; } else { -- 2.20.1