diff --git a/common/content/buffer.xhtml b/common/content/buffer.xhtml
index 089b1563..6e05b7ee 100644
--- a/common/content/buffer.xhtml
+++ b/common/content/buffer.xhtml
@@ -1,7 +1,7 @@
-
+
diff --git a/common/content/commandline.js b/common/content/commandline.js
index 6a07fd50..6799408c 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -256,6 +256,7 @@ var CommandWidgets = Class("CommandWidgets", {
let elem = this.multilineOutput;
elem.contentWindow.addEventListener("unload", function (event) { event.preventDefault(); }, true);
+ elem.contentDocument.documentElement.id = "dactyl-multiline-output-top";
elem.contentDocument.body.id = "dactyl-multiline-output-content";
elem.__defineGetter__("atEnd", function ()
!Buffer.isScrollable(elem.contentDocument.documentElement, 1));
@@ -1858,6 +1859,7 @@ var ItemList = Class("ItemList", {
this._win = iframe.contentWindow;
this._container = iframe.parentNode;
+ this._doc.documentElement.id = id + "-top";
this._doc.body.id = id + "-content";
this._doc.body.className = iframe.className + "-content";
this._doc.body.appendChild(this._doc.createTextNode(""));
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 5569e104..01fcd24a 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -398,13 +398,12 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
},
focus: function focus(elem, flags) {
- util.dump("focus(" + (elem instanceof Element ? util.objectToString(elem) : elem) + ")");
flags = flags || services.focus.FLAG_BYMOUSE;
try {
if (elem instanceof Document)
elem = elem.defaultView;
if (elem instanceof Window)
- elem.focus();
+ services.focus.focusedWindow = elem;
else
services.focus.setFocus(elem, flags);
} catch (e) {
@@ -445,13 +444,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
catch (e) {}
if (clearFocusedElement) {
- util.dump("blur(" + (dactyl.focusedElement instanceof Element ? util.objectToString(dactyl.focusedElement)
- : dactyl.focusedElement) +
- ")");
if (dactyl.focusedElement)
dactyl.focusedElement.blur();
if (win && Editor.getEditor(win)) {
- util.dump("blur(" + win + ")");
win.blur();
if (win.frameElement)
util.dump("blur(" + util.objectToString(win.frameElement) + ")");
@@ -465,8 +460,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (elem && elem != dactyl.focusedElement)
dactyl.focus(elem);
- if (services.focus.focusedWindow == null)
- util.dumpStack("focusedWindow == null");
},
/** @property {Element} The currently focused element. */
diff --git a/common/content/modes.js b/common/content/modes.js
index 8f3f0ca1..f51fd648 100644
--- a/common/content/modes.js
+++ b/common/content/modes.js
@@ -51,8 +51,7 @@ var Modes = Module("modes", {
}
});
- this.addMode("COMMAND_LINE", { char: "c", input: true,
- display: function () modes.extended & modes.OUTPUT_MULTILINE ? null : this.disp });
+ this.addMode("COMMAND_LINE", { char: "c", input: true });
this.addMode("CARET", {}, {
get pref() prefs.get("accessibility.browsewithcaret"),
@@ -82,7 +81,7 @@ var Modes = Module("modes", {
postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "") modes.pop() },
onEvent: function () { if (modes.main == modes.QUOTE) modes.pop() }
});
- this.addMode("OUTPUT_MULTILINE");
+ this.addMode("OUTPUT_MULTILINE", { ownsFocus: true });
// this._extended modes, can include multiple modes, and even main modes
this.addMode("EX", true);
diff --git a/common/modules/util.jsm b/common/modules/util.jsm
index 518c2f44..bf1a6add 100644
--- a/common/modules/util.jsm
+++ b/common/modules/util.jsm
@@ -486,7 +486,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 || stack.length)).join("\n");
+ stack = stack.slice(2, 2 + (frames || stack.length)).join("\n").replace(/^/gm, " ");
util.dump((arguments.length == 0 ? "Stack" : msg) + "\n" + stack + "\n");
},