1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 22:22:27 +01:00

Fix scrolling bug.

This commit is contained in:
Kris Maglione
2010-12-29 11:10:25 -05:00
parent 27cc988fff
commit 2a1532fca6
2 changed files with 11 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ var CommandWidgets = Class("CommandWidgets", {
<vbox id={config.commandContainer}>
<vbox class="dactyl-container" hidden="false" collapsed="true">
<vbox class="dactyl-container" id="dactyl-multiline-output-container" hidden="false" collapsed="true">
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
contextmenu="dactyl-contextmenu"
@@ -274,7 +274,7 @@ var CommandWidgets = Class("CommandWidgets", {
return elem;
}),
multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")),
mowContainer: Class.memoize(function () this.multilineOutput.parentNode)
mowContainer: Class.memoize(function () document.getElementById("dactyl-multiline-output-container"))
}, {
getEditor: function (elem) {
elem.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
@@ -541,7 +541,12 @@ var CommandLine = Module("commandline", {
set: function (value) { this.widgets.multilineInput.collapsed = !value; }
}),
multilineOutputVisible: Modes.boundProperty({
set: function (value) { (this.widgets.mowContainer || {}).collapsed = !value; }
set: function (value) {
this.widgets.mowContainer.collapsed = !value;
let elem = this.widgets.multilineOutput;
if (!value && elem && elem.contentWindow == document.commandDispatcher.focusedWindow)
document.commandDispatcher.focusedWindow = content;
}
}),
/**

View File

@@ -330,13 +330,15 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
let quote = util.identity;
if (flags.q)
quote = function quote(obj) typeof obj === "number" ? obj : String.quote(obj);
if (flags.e)
quote = function quote(obj) "";
if (set.has(defaults, name))
stack.top.elements.push(quote(defaults[name]));
else {
stack.top.elements.push(update(
function (obj) obj[name] != null ? quote(obj[name]) : set.has(obj, name) ? "" : unknown(full),
{ test: function (obj) obj[name] != null && obj[name] !== false }));
{ test: function (obj) obj[name] != null && obj[name] !== false && (!flags.e || obj[name] != "") }));
for (let elem in array.iterValues(stack))
elem.seen[name] = true;