aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932014-12-14 07:33:45 +0000
committermrmr19932014-12-14 07:33:45 +0000
commite826484584f1c599e2f733765fef34e080bbcb89 (patch)
treeb01800bde1cc71a76e78b07a350364f13563be96
parent5514284ea1ccaf610ba84fc51cdabee5f9e4ff68 (diff)
downloadvimium-e826484584f1c599e2f733765fef34e080bbcb89.tar.bz2
List HTML5 date types that should use simulateSelect
-rw-r--r--lib/dom_utils.coffee5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 73016bc8..73d29eb6 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -93,6 +93,11 @@ DomUtils =
#
# Selectable means that we should use the simulateSelect method to activate the element instead of a click.
#
+ # The html5 input types that should use simulateSelect are:
+ # ["date", "datetime", "datetime-local", "email", "month", "number", "password", "range", "search",
+ # "submit", "tel", "text", "time", "url", "week"]
+ # An unknown type will be treated the same as "text", in the same way that the browser does.
+ #
isSelectable: (element) ->
unselectableTypes = ["button", "checkbox", "color", "file", "hidden", "image", "radio", "reset"]
(element.nodeName.toLowerCase() == "input" && unselectableTypes.indexOf(element.type) == -1) ||