diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-10-01 18:03:48 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-10-01 18:03:48 -0400 |
commit | d14e57ee9ae14a7448493b54290c068683aeb68e (patch) | |
tree | 68bee90f14230463aed6567ddde6815333ec7354 /common/content/mow.js | |
parent | cbbb3de86fb13c8012ebf632739813829410bd81 (diff) | |
download | pentadactyl-d14e57ee9ae14a7448493b54290c068683aeb68e.tar.gz |
Add search to the MOW, skip search results in hidden nodes, and fix MOW sizing issues.
Diffstat (limited to 'common/content/mow.js')
-rw-r--r-- | common/content/mow.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/content/mow.js b/common/content/mow.js index 9f17fa23..7bf40a9f 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -103,12 +103,15 @@ var MOW = Module("mow", { if (modes.main != modes.OUTPUT_MULTILINE) { modes.push(modes.OUTPUT_MULTILINE, null, { onKeyPress: this.closure.onKeyPress, + leave: this.closure(function leave(stack) { if (stack.pop) for (let message in values(this.messages)) if (message.leave) message.leave(stack); - }) + }), + + window: this.window }); this.messages = []; } @@ -241,12 +244,14 @@ var MOW = Module("mow", { let doc = this.widget.contentDocument; - let availableHeight = config.outputHeight; + let trim = Math.max(0, DOM("#" + config.ids.commandContainer, document).rect.bottom - window.innerHeight); + let availableHeight = config.outputHeight - trim; if (this.visible) availableHeight += parseFloat(this.widgets.mowContainer.height || 0); availableHeight -= extra || 0; doc.body.style.minWidth = this.widgets.commandbar.commandline.scrollWidth + "px"; + this.widgets.mowContainer.height = Math.min(doc.body.clientHeight, availableHeight) + "px"; this.timeout(function () this.widgets.mowContainer.height = Math.min(doc.body.clientHeight, availableHeight) + "px", |