diff --git a/common/content/commandline.js b/common/content/commandline.js
index 322a5e7a..6a07fd50 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -10,7 +10,6 @@
var CommandWidgets = Class("CommandWidgets", {
init: function () {
- let _commandline = "if (window.dactyl) return dactyl.modules.commandline";
let _status = "dactyl-statusline-field-";
util.overlayWindow(window, {
@@ -38,21 +37,21 @@ var CommandWidgets = Class("CommandWidgets", {
+ onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
+ onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
+ onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
@@ -63,16 +62,19 @@ var CommandWidgets = Class("CommandWidgets", {
+ oninput="dactyl.modules.commandline.onEvent(event);"
+ onkeyup="dactyl.modules.commandline.onEvent(event);"
+ onfocus="dactyl.modules.commandline.onEvent(event);"
+ onblur="dactyl.modules.commandline.onEvent(event);"/>
+ onkeypress="dactyl.modules.commandline.onMultilineInputEvent(event);"
+ oninput="dactyl.modules.commandline.onMultilineInputEvent(event);"
+ onblur="dactyl.modules.commandline.onMultilineInputEvent(event);"/>
.elements()
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index b1628e9a..5569e104 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -398,20 +398,19 @@ 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)
- services.focus.focusedWindow = elem;
+ elem.focus();
else
services.focus.setFocus(elem, flags);
} catch (e) {
util.dump(elem);
util.reportError(e);
}
- if (services.focus.focusedWindow == null)
- util.dumpStack("focusedWindow == null");
},
/**
@@ -421,7 +420,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* element.
*/
focusContent: function focusContent(clearFocusedElement) {
- if (window != services.windowWatcher.activeWindow)
+ util.dump("focusContent(" + clearFocusedElement + ") " +
+ (window == services.focus.activeWindow));
+
+ if (window != services.focus.activeWindow)
return;
let win = document.commandDispatcher.focusedWindow;
@@ -443,10 +445,16 @@ 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) + ")");
if (win.frameElement)
win.frameElement.blur();
}
diff --git a/common/content/hints.js b/common/content/hints.js
index 2785b09d..f71d07b7 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -1129,7 +1129,7 @@ var Hints = Module("hints", {
"XPath strings of hintable elements for extended hint modes",
"regexpmap", "[iI]:" + xpath(["img"]) +
",[OTivVWy]:" + xpath(["{a,area}[@href]", "{img,iframe}[@src]"]) +
- ",[F]:" + xpath(["div", "span", "p", "body", "html"]) +
+ ",[F]:" + xpath(["body", "code", "div", "html", "p", "pre", "span"]) +
",[S]:" + xpath(["input[not(@type='hidden')]", "textarea", "button", "select"]),
{ validator: Option.validateXPath });