diff --git a/common/content/commandline.js b/common/content/commandline.js index 58c28b0d..4c0ec41a 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -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 diff --git a/common/content/events.js b/common/content/events.js index 32630d88..323cfa38 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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 { diff --git a/common/content/modes.js b/common/content/modes.js index 598ee011..3e395e63 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -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,