summaryrefslogtreecommitdiff
path: root/common/content/events.js
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-05-31 17:34:47 -0400
committerKris Maglione <maglione.k@gmail.com>2011-05-31 17:34:47 -0400
commit7d019560be3782ddb3e31e0602bd014e7bc0e88d (patch)
treead7c750ca3846719e5738f1abbd8760aa3d0e44f /common/content/events.js
parent1632e5d594e2d3a10237b90cc087af3b92cf82af (diff)
downloadpentadactyl-7d019560be3782ddb3e31e0602bd014e7bc0e88d.tar.gz
Fix Firefox freakout. Closes issue #463.
Diffstat (limited to 'common/content/events.js')
-rw-r--r--common/content/events.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/content/events.js b/common/content/events.js
index 1f13aefa..22a1f3ae 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -1451,11 +1451,15 @@ var Events = Module("events", {
if (elem == null && urlbar && urlbar.inputField == this._lastFocus)
util.threadYield(true); // Why? --Kris
- while (modes.main.ownsFocus && !modes.topOfStack.params.holdFocus)
+ while (modes.main.ownsFocus && modes.topOfStack.params.ownsFocus != elem
+ && !modes.topOfStack.params.holdFocus)
modes.pop(null, { fromFocus: true });
}
finally {
this._lastFocus = elem;
+
+ if (modes.main.ownsFocus)
+ modes.topOfStack.params.ownsFocus = elem;
}
},