From 8ce52393e5b6d34cee82133950afe4e181b8f742 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 16 Feb 2013 11:46:31 +0100 Subject: [PATCH] Fixed wrong check if a fired hint is an input. We considered every html form input element as editable. This brakes the next submit element on duckduckgo's search result page. Now we exclude the input type submit, reset and image from the editable input elements. --- src/dom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dom.c b/src/dom.c index f805e91..9ebba04 100644 --- a/src/dom.c +++ b/src/dom.c @@ -126,11 +126,13 @@ gboolean dom_is_editable(Element* element) } char *type = webkit_dom_element_get_attribute(element, "type"); if (!g_ascii_strcasecmp(tagname, "input") - || !g_ascii_strcasecmp(type, "text") - || !g_ascii_strcasecmp(type, "password") + && g_ascii_strcasecmp(type, "submit") + && g_ascii_strcasecmp(type, "reset") + && g_ascii_strcasecmp(type, "image") ) { return TRUE; } + return FALSE; } -- 2.20.1