From 5cf969a1bd06ebd6a35f71100d52836a0b3b9f5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Marie?= Date: Wed, 22 Apr 2015 06:27:59 +0200 Subject: [PATCH] support html5 new input types mark new input types as editable, according to the way of webkit handle these. --- src/dom.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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 { -- 2.20.1