1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 18:47:58 +01:00

Fix REPL scroll offset calculation.

This commit is contained in:
Kris Maglione
2011-02-17 07:27:21 -05:00
parent e17b99c9c6
commit c8cc18b440
2 changed files with 8 additions and 4 deletions

View File

@@ -623,7 +623,7 @@ var CommandLine = Module("commandline", {
if (modes.main == modes.OUTPUT_MULTILINE && !mow.isScrollable(1))
modes.pop();
if (modes.main != modes.OUTPUT_MULTILINE)
if (!modes.have(modes.OUTPUT_MULTILINE))
mow.visible = false;
},
@@ -1580,6 +1580,9 @@ var ItemList = Class("ItemList", {
_dom: function _dom(xml, map) util.xmlToDom(xml instanceof XML ? xml : <>{xml}</>, this._doc, map),
_autoSize: function _autoSize() {
if (!this._div)
return;
if (this._container.collapsed)
this._div.style.minWidth = document.getElementById("dactyl-commandline").scrollWidth + "px";
@@ -1638,7 +1641,7 @@ var ItemList = Class("ItemList", {
this._divNodes.completions.appendChild(context.cache.nodes.root);
}, this);
this.timeout(this._autoSize, 0);
this.timeout(this._autoSize);
},
/**

View File

@@ -739,8 +739,8 @@ var JavaScript = Module("javascript", {
<div highlight="REPL-P" key="p">{xml}</div>
</e4x>.elements(), this.document, nodes));
this.rootNode.scrollTop = nodes.e.getBoundingClientRect().top
- this.rootNode.getBoundingClientRect().top;
this.rootNode.scrollTop += nodes.e.getBoundingClientRect().top
- this.rootNode.getBoundingClientRect().top;
},
count: 0,
@@ -788,6 +788,7 @@ var JavaScript = Module("javascript", {
this.updatePrompt();
modules.mow.echo(this.repl);
this.widgets.message = null;
open.superapply(this, arguments);
},