1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 15:47:58 +01:00

Support all HTML 5 editable input types.

This commit is contained in:
Kris Maglione
2010-08-28 18:58:37 -04:00
parent f1ca59a83d
commit 9f0b293881
3 changed files with 14 additions and 13 deletions

View File

@@ -1508,7 +1508,7 @@ const Buffer = Module("buffer", {
let xpath = ["input", "textarea[not(@disabled) and not(@readonly)]"];
let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) {
if (elem.readOnly || elem instanceof HTMLInputElement && ["file", "search", "text", "password"].indexOf(elem.type) < 0)
if (elem.readOnly || elem instanceof HTMLInputElement && set.has(Events.editableInputs, elem.type))
return false;
let computedStyle = util.computedStyle(elem);
return computedStyle.visibility != "hidden" && computedStyle.display != "none";