diff --git a/common/content/buffer.js b/common/content/buffer.js index 758c6065..63da798b 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1626,8 +1626,9 @@ const Buffer = Module("buffer", { return false; let computedStyle = util.computedStyle(elem); + let rect = elem.getBoundingClientRect(); return computedStyle.visibility != "hidden" && computedStyle.display != "none" && - computedStyle.MozUserFocus != "ignore"; + computedStyle.MozUserFocus != "ignore" && rect.width && rect.height; }); dactyl.assert(elements.length > 0); diff --git a/common/content/commands.js b/common/content/commands.js index 92b1626b..5a95bae0 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -285,6 +285,8 @@ const Command = Class("Command", { */ replacementText: null }, { + bindMacro: function (args, default_) { + }, // TODO: do we really need more than longNames as a convenience anyway? /** diff --git a/common/locale/en-US/repeat.xml b/common/locale/en-US/repeat.xml index 96641bd4..5533f47c 100644 --- a/common/locale/en-US/repeat.xml +++ b/common/locale/en-US/repeat.xml @@ -254,14 +254,14 @@ \ p:first-line { font-variant: small-caps; } \ div#side-bar > :first-child { display: none; } -:command do-some-stuff +:command! do-some-stuff \ -description A command which does some stuff in JavaScript \ :javascript <<EOF \ window.do(some); \ window.do(stuff); \EOF -:command do-some-stuff +:command! do-some-stuff \ -description A command which does some stuff in JavaScript \ :javascript \\ window.do(some);