mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-09 09:34:12 +01:00
Go to irritating lengths to keep the hidden location bar from stealing keyboard focus. Closes issue #292.
This commit is contained in:
@@ -143,9 +143,10 @@ var Events = Module("events", {
|
||||
catch (e) {
|
||||
dactyl.reportError(e);
|
||||
if (e.message == "Interrupted")
|
||||
dactyl.echoerr("Interrupted");
|
||||
dactyl.echoerr("Interrupted", commandline.FORCE_SINGLELINE);
|
||||
else
|
||||
dactyl.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
|
||||
dactyl.echoerr("Processing " + event.type + " event: " + (e.echoerr || e),
|
||||
commandline.FORCE_SINGLELINE);
|
||||
}
|
||||
};
|
||||
return wrappedListener;
|
||||
@@ -739,6 +740,13 @@ var Events = Module("events", {
|
||||
if (elem instanceof Element) {
|
||||
let win = elem.ownerDocument.defaultView;
|
||||
|
||||
if (event.target instanceof Ci.nsIDOMXULTextBoxElement)
|
||||
for (let e = elem; e; e = e.parentNode)
|
||||
if (util.computedStyle(e).visibility !== "visible") {
|
||||
elem.blur();
|
||||
break;
|
||||
}
|
||||
|
||||
if (events.isContentNode(elem) && !buffer.focusAllowed(elem)
|
||||
&& !(services.focus.getLastFocusMethod(win) & 0x7000)
|
||||
&& isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement, Window])) {
|
||||
|
||||
Reference in New Issue
Block a user