diff --git a/common/content/commandline.js b/common/content/commandline.js index 84afd990..b8123a63 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -408,7 +408,7 @@ var CommandLine = Module("commandline", { set quiet(val) { this._quiet = val; ["commandbar", "statusbar"].forEach(function (nodeSet) { - Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { + Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this); @@ -828,11 +828,10 @@ var CommandLine = Module("commandline", { let command = this.command; if (event.type == "blur") { - // prevent losing focus, there should be a better way, but it just didn't work otherwise this.timeout(function () { if (this.commandVisible && event.originalTarget == this.widgets.active.command.inputField) dactyl.focus(this.widgets.active.command.inputField); - }, 0); + }); } else if (event.type == "focus") { if (!this.commandVisible && event.target == this.widgets.active.command.inputField) { diff --git a/common/content/events.js b/common/content/events.js index 30f81039..d9979569 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -241,15 +241,15 @@ var Events = Module("events", { * @returns {boolean} */ feedkeys: function (keys, noremap, quiet, mode) { - - let wasFeeding = this.feedingKeys; - this.feedingKeys = true; - this.duringFeed = this.duringFeed || []; - let wasQuiet = commandline.quiet; - if (quiet) - commandline.quiet = quiet; - try { + var wasFeeding = this.feedingKeys; + this.feedingKeys = true; + this.duringFeed = this.duringFeed || []; + + var wasQuiet = commandline.quiet; + if (quiet) + commandline.quiet = quiet; + util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 9885a1e8..e5dde3f3 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -484,7 +484,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), */ dumpStack: function dumpStack(msg, frames) { let stack = util.stackLines(Error().stack); - stack = stack.slice(2, 2 + (frames || 0)).join("\n"); + stack = stack.slice(2, 2 + (frames || stack.length)).join("\n"); util.dump((arguments.length == 0 ? "Stack" : msg) + "\n" + stack + "\n"); },