From 7853331e7c7c0b278a22e45a47cd123ec6f406ed Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 14 Oct 2010 22:05:58 -0400 Subject: [PATCH] Fix focus bug by removing a fix for other focus bugs. --HG-- extra : rebase_source : c820f43ee5099802f6b40797aa9960d16e929c44 --- common/content/events.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index ec73667f..1871011b 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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;