mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 22:58:01 +01:00
Fix REPL scroll offset calculation.
This commit is contained in:
@@ -623,7 +623,7 @@ var CommandLine = Module("commandline", {
|
|||||||
if (modes.main == modes.OUTPUT_MULTILINE && !mow.isScrollable(1))
|
if (modes.main == modes.OUTPUT_MULTILINE && !mow.isScrollable(1))
|
||||||
modes.pop();
|
modes.pop();
|
||||||
|
|
||||||
if (modes.main != modes.OUTPUT_MULTILINE)
|
if (!modes.have(modes.OUTPUT_MULTILINE))
|
||||||
mow.visible = false;
|
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),
|
_dom: function _dom(xml, map) util.xmlToDom(xml instanceof XML ? xml : <>{xml}</>, this._doc, map),
|
||||||
|
|
||||||
_autoSize: function _autoSize() {
|
_autoSize: function _autoSize() {
|
||||||
|
if (!this._div)
|
||||||
|
return;
|
||||||
|
|
||||||
if (this._container.collapsed)
|
if (this._container.collapsed)
|
||||||
this._div.style.minWidth = document.getElementById("dactyl-commandline").scrollWidth + "px";
|
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._divNodes.completions.appendChild(context.cache.nodes.root);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.timeout(this._autoSize, 0);
|
this.timeout(this._autoSize);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -739,8 +739,8 @@ var JavaScript = Module("javascript", {
|
|||||||
<div highlight="REPL-P" key="p">{xml}</div>
|
<div highlight="REPL-P" key="p">{xml}</div>
|
||||||
</e4x>.elements(), this.document, nodes));
|
</e4x>.elements(), this.document, nodes));
|
||||||
|
|
||||||
this.rootNode.scrollTop = nodes.e.getBoundingClientRect().top
|
this.rootNode.scrollTop += nodes.e.getBoundingClientRect().top
|
||||||
- this.rootNode.getBoundingClientRect().top;
|
- this.rootNode.getBoundingClientRect().top;
|
||||||
},
|
},
|
||||||
|
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -788,6 +788,7 @@ var JavaScript = Module("javascript", {
|
|||||||
this.updatePrompt();
|
this.updatePrompt();
|
||||||
|
|
||||||
modules.mow.echo(this.repl);
|
modules.mow.echo(this.repl);
|
||||||
|
this.widgets.message = null;
|
||||||
|
|
||||||
open.superapply(this, arguments);
|
open.superapply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user