mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 09:27:58 +01:00
Properly blur the command line when leaving command line mode. Closes issue #285.
This commit is contained in:
@@ -1383,6 +1383,7 @@ var CommandLine = Module("commandline", {
|
|||||||
char: "c",
|
char: "c",
|
||||||
description: "Active when the command line is focused",
|
description: "Active when the command line is focused",
|
||||||
input: true,
|
input: true,
|
||||||
|
ownsFocus: true,
|
||||||
get mappingSelf() commandline.commandSession
|
get mappingSelf() commandline.commandSession
|
||||||
});
|
});
|
||||||
// this._extended modes, can include multiple modes, and even main modes
|
// this._extended modes, can include multiple modes, and even main modes
|
||||||
|
|||||||
@@ -1346,7 +1346,7 @@ var Events = Module("events", {
|
|||||||
if (elem == null && urlbar && urlbar.inputField == this._lastFocus)
|
if (elem == null && urlbar && urlbar.inputField == this._lastFocus)
|
||||||
util.threadYield(true); // Why? --Kris
|
util.threadYield(true); // Why? --Kris
|
||||||
|
|
||||||
while (modes.main.ownsFocus)
|
while (modes.main.ownsFocus && !modes.topOfStack.params.holdFocus)
|
||||||
modes.pop(null, { fromFocus: true });
|
modes.pop(null, { fromFocus: true });
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|||||||
@@ -440,6 +440,8 @@ var Modes = Module("modes", {
|
|||||||
|
|
||||||
input: Class.memoize(function () this.bases.length && this.bases.some(function (b) b.input)),
|
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 passUnknown() this.input,
|
||||||
|
|
||||||
get mask() this,
|
get mask() this,
|
||||||
|
|||||||
Reference in New Issue
Block a user