From: Sébastien Marie Date: Wed, 22 Apr 2015 04:27:59 +0000 (+0200) Subject: support html5 new input types X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=5cf969a1bd06ebd6a35f71100d52836a0b3b9f5d;p=vimb.git support html5 new input types mark new input types as editable, according to the way of webkit handle these. --- diff --git a/src/dom.c b/src/dom.c index e8c2430..397ec2d 100644 --- a/src/dom.c +++ b/src/dom.c @@ -141,8 +141,21 @@ gboolean dom_is_editable(Element *element) if (!g_ascii_strcasecmp(tagname, "textarea")) { result = true; } else if (!g_ascii_strcasecmp(tagname, "input") - && (!*type || !g_ascii_strcasecmp(type, "text") || !g_ascii_strcasecmp(type, "password") - || !g_ascii_strcasecmp(type, "search")) + && (!*type + || !g_ascii_strcasecmp(type, "text") + || !g_ascii_strcasecmp(type, "password") + || !g_ascii_strcasecmp(type, "color") + || !g_ascii_strcasecmp(type, "date") + || !g_ascii_strcasecmp(type, "datetime") + || !g_ascii_strcasecmp(type, "datetime-local") + || !g_ascii_strcasecmp(type, "email") + || !g_ascii_strcasecmp(type, "month") + || !g_ascii_strcasecmp(type, "number") + || !g_ascii_strcasecmp(type, "search") + || !g_ascii_strcasecmp(type, "tel") + || !g_ascii_strcasecmp(type, "time") + || !g_ascii_strcasecmp(type, "url") + || !g_ascii_strcasecmp(type, "week")) ) { result = true; } else {