1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 23:28:15 +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

@@ -114,7 +114,7 @@ const Hints = Module("hints", {
let type = elem.type;
if (elem instanceof HTMLInputElement && /(submit|button|reset)/.test(type))
if (elem instanceof HTMLInputElement && set.has(Events.editableInputs, elem.type))
return [elem.value, false];
else {
for (let [, option] in Iterator(options["hintinputs"].split(","))) {
@@ -261,7 +261,7 @@ const Hints = Module("hints", {
if (computedStyle.getPropertyValue("visibility") != "visible" || computedStyle.getPropertyValue("display") == "none")
continue;
if (elem instanceof HTMLInputElement || elem instanceof HTMLSelectElement || elem instanceof HTMLTextAreaElement)
if (isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement]))
[hint.text, hint.showText] = this._getInputHint(elem, doc);
else
hint.text = elem.textContent.toLowerCase();