X-Git-Url: https://git.donarmstrong.com/?p=dactyl.git;a=blobdiff_plain;f=common%2Fcontent%2Fevents.js;h=ffa279bb1fd41ebc1b362bdee56d9908dffba44c;hp=98dc0281f512df5362a4c5f6528498d3576c68c2;hb=3d837eb266a3a01d424192aa4ec1a167366178c5;hpb=d8a3bcebff36df7b128b36e0b57b715479e155a0 diff --git a/common/content/events.js b/common/content/events.js index 98dc028..ffa279b 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -611,7 +611,10 @@ var Events = Module("events", { if (!(services.focus.getLastFocusMethod(win) & 0x3000) && events.isContentNode(elem) && !buffer.focusAllowed(elem) - && isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement, Window])) { + && isinstance(elem, [Ci.nsIDOMHTMLInputElement, + Ci.nsIDOMHTMLSelectElement, + Ci.nsIDOMHTMLTextAreaElement, + Ci.nsIDOMWindow])) { if (elem.frameElement) dactyl.focusContent(true); @@ -673,7 +676,7 @@ var Events = Module("events", { // Hack to deal with and so forth not dispatching input // events - if (key && event.originalTarget instanceof HTMLInputElement && !modes.main.passthrough) { + if (key && event.originalTarget instanceof Ci.nsIDOMHTMLInputElement && !modes.main.passthrough) { let elem = event.originalTarget; elem.dactylKeyPress = elem.value; util.timeout(function () { @@ -844,7 +847,7 @@ var Events = Module("events", { // access to the real focus target // Huh? --djk onFocusChange: util.wrapCallback(function onFocusChange(event) { - function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument + function hasHTMLDocument(win) win && win.document && win.document instanceof Ci.nsIDOMHTMLDocument if (dactyl.ignoreFocus) return; @@ -861,7 +864,7 @@ var Events = Module("events", { if (elem && elem.readOnly) return; - if (isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) { + if (isinstance(elem, [Ci.nsIDOMHTMLEmbedElement, Ci.nsIDOMHTMLEmbedElement])) { if (!modes.main.passthrough && modes.main != modes.EMBED) modes.push(modes.EMBED); return; @@ -965,8 +968,9 @@ var Events = Module("events", { isInputElement: function isInputElement(elem) { return DOM(elem).isEditable || - isinstance(elem, [HTMLEmbedElement, HTMLObjectElement, - HTMLSelectElement]) + isinstance(elem, [Ci.nsIDOMHTMLEmbedElement, + Ci.nsIDOMHTMLObjectElement, + Ci.nsIDOMHTMLSelectElement]); }, kill: function kill(event) { @@ -1168,4 +1172,4 @@ var Events = Module("events", { } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: