1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 20:15:45 +01:00

Add ;S ‘add search keyword’ hint mode.

This commit is contained in:
Kris Maglione
2010-10-09 16:45:22 -04:00
parent 8fb31f7696
commit fdddfb31ef
11 changed files with 178 additions and 76 deletions

View File

@@ -670,7 +670,7 @@ const Events = Module("events", {
// displayed too. --djk
function isInputField() {
let elem = dactyl.focus;
return elem instanceof HTMLInputElement && set.has(Events.editableInputs, elem.type)
return elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type)
|| elem instanceof HTMLIsIndexElement;
}
@@ -738,7 +738,7 @@ const Events = Module("events", {
if (elem && elem.readOnly)
return;
if (elem instanceof HTMLInputElement && set.has(Events.editableInputs, elem.type) ||
if (elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type) ||
elem instanceof HTMLSelectElement) {
dactyl.mode = modes.INSERT;
if (hasHTMLDocument(win))
@@ -1075,9 +1075,6 @@ const Events = Module("events", {
// }
}
}, {
editableInputs: set(["date", "datetime", "datetime-local", "email", "file",
"month", "number", "password", "range", "search",
"tel", "text", "time", "url", "week"]),
isContentNode: function (node) {
let win = (node.ownerDocument || node).defaultView;
for (; win; win = win.parent != win && win.parent)
@@ -1087,7 +1084,7 @@ const Events = Module("events", {
},
isInputElemFocused: function () {
let elem = dactyl.focus;
return elem instanceof HTMLInputElement && set.has(Events.editableInputs, elem.type) ||
return elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type) ||
isinstance(elem, [HTMLIsIndexElement, HTMLEmbedElement,
HTMLObjectElement, HTMLTextAreaElement]);
}