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:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user