1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 10:25:46 +01:00

Fix Firefox freakout. Closes issue #463.

This commit is contained in:
Kris Maglione
2011-05-31 17:34:47 -04:00
parent 1632e5d594
commit 7d019560be
4 changed files with 38 additions and 25 deletions

View File

@@ -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;
}
},

View File

@@ -411,15 +411,15 @@ var Modes = Module("modes", {
prev = stack && stack.pop || this.topOfStack;
if (push)
this._modeStack.push(push);
if (stack && stack.pop)
for (let { obj, prop, value, test } in values(this.topOfStack.saved))
if (!test || !test(stack, prev))
dactyl.trapErrors(function () { obj[prop] = value });
this.show();
});
if (stack && stack.pop)
for (let { obj, prop, value, test } in values(this.topOfStack.saved))
if (!test || !test(stack, prev))
dactyl.trapErrors(function () { obj[prop] = value });
this.show();
if (this.topOfStack.params.enter && prev)
dactyl.trapErrors("enter", this.topOfStack.params,
push ? { push: push } : stack || {},