diff --git a/common/content/mow.js b/common/content/mow.js index 6be1f2cd..e9989ef9 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -265,7 +265,12 @@ var MOW = Module("mow", { this.visible = true; }, - get spaceNeeded() Math.max(0, DOM("#" + config.ids.commandContainer, document).rect.bottom - window.innerHeight), + get spaceNeeded() { + if (DOM("#dactyl-bell", document).isVisible) + return 0; + return Math.max(0, DOM("#" + config.ids.commandContainer, document).rect.bottom + - window.innerHeight); + }, /** * Update or remove the multi-line output widget's "MORE" prompt. diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index cc7384cb..b1f84cd3 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -376,8 +376,8 @@ var DOM = Class("DOM", { * @returns {boolean} */ get isVisible() { - let style = this.style; - return style.visibility == "visible" && style.display != "none"; + let style = this[0] && this.style; + return style && style.visibility == "visible" && style.display != "none"; }, get editor() {