1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-19 23:57:59 +01:00

Properly blur the command line when leaving command line mode. Closes issue #285.

This commit is contained in:
Kris Maglione
2011-02-17 09:52:05 -05:00
parent 8295310a14
commit c5da372a3f
3 changed files with 4 additions and 1 deletions

View File

@@ -1383,6 +1383,7 @@ var CommandLine = Module("commandline", {
char: "c",
description: "Active when the command line is focused",
input: true,
ownsFocus: true,
get mappingSelf() commandline.commandSession
});
// this._extended modes, can include multiple modes, and even main modes

View File

@@ -1346,7 +1346,7 @@ var Events = Module("events", {
if (elem == null && urlbar && urlbar.inputField == this._lastFocus)
util.threadYield(true); // Why? --Kris
while (modes.main.ownsFocus)
while (modes.main.ownsFocus && !modes.topOfStack.params.holdFocus)
modes.pop(null, { fromFocus: true });
}
finally {

View File

@@ -440,6 +440,8 @@ var Modes = Module("modes", {
input: Class.memoize(function () this.bases.length && this.bases.some(function (b) b.input)),
ownsFocus: Class.memoize(function () this.bases.length && this.bases.some(function (b) b.ownsFocus)),
get passUnknown() this.input,
get mask() this,