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:
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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 || {},
|
||||
|
||||
Reference in New Issue
Block a user