mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-08 01:15:45 +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, "popuphidden", this.closure.onPopupHidden, true);
|
||||||
this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true);
|
this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true);
|
||||||
this.addSessionListener(window, "resize", this.closure.onResize, true);
|
this.addSessionListener(window, "resize", this.closure.onResize, true);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
@@ -658,9 +657,8 @@ const Events = Module("events", {
|
|||||||
// TODO: Merge with onFocusChange
|
// TODO: Merge with onFocusChange
|
||||||
onFocus: function onFocus(event) {
|
onFocus: function onFocus(event) {
|
||||||
let elem = event.originalTarget;
|
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]))
|
&& isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement]))
|
||||||
elem.blur();
|
elem.blur();
|
||||||
},
|
},
|
||||||
@@ -685,10 +683,6 @@ const Events = Module("events", {
|
|||||||
if (elem && elem.readOnly)
|
if (elem && elem.readOnly)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Events.isContentNode(elem) && !buffer.focusAllowed(win)
|
|
||||||
&& isinstance(elem, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement]))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type) ||
|
if (elem instanceof HTMLInputElement && set.has(util.editableInputs, elem.type) ||
|
||||||
elem instanceof HTMLSelectElement) {
|
elem instanceof HTMLSelectElement) {
|
||||||
dactyl.mode = modes.INSERT;
|
dactyl.mode = modes.INSERT;
|
||||||
|
|||||||
Reference in New Issue
Block a user