mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 09:54:11 +01:00
Fix focus bug by removing a fix for other focus bugs.
--HG-- extra : rebase_source : c820f43ee5099802f6b40797aa9960d16e929c44
This commit is contained in:
@@ -83,7 +83,6 @@ const Events = Module("events", {
|
||||
this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true);
|
||||
this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true);
|
||||
this.addSessionListener(window, "resize", this.closure.onResize, true);
|
||||
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
@@ -658,9 +657,8 @@ const Events = Module("events", {
|
||||
// TODO: Merge with onFocusChange
|
||||
onFocus: function onFocus(event) {
|
||||
let elem = event.originalTarget;
|
||||
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
|
||||
|
||||
if (Events.isContentNode(elem) && !buffer.focusAllowed(win)
|
||||
if (Events.isContentNode(elem) && !buffer.focusAllowed(elem)
|
||||
&& isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement]))
|
||||
elem.blur();
|
||||
},
|
||||
@@ -685,10 +683,6 @@ const Events = Module("events", {
|
||||
if (elem && elem.readOnly)
|
||||
return;
|
||||
|
||||
if (Events.isContentNode(elem) && !buffer.focusAllowed(win)
|
||||
&& isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement]))
|
||||
return;
|
||||
|
||||
if (elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type) ||
|
||||
elem instanceof HTMLSelectElement) {
|
||||
dactyl.mode = modes.INSERT;
|
||||
|
||||
Reference in New Issue
Block a user