mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 00:32:27 +01:00
Fix scrolling bug.
This commit is contained in:
@@ -33,7 +33,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
|
|
||||||
<vbox id={config.commandContainer}>
|
<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"
|
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
|
||||||
flex="1" hidden="false" collapsed="false"
|
flex="1" hidden="false" collapsed="false"
|
||||||
contextmenu="dactyl-contextmenu"
|
contextmenu="dactyl-contextmenu"
|
||||||
@@ -274,7 +274,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
return elem;
|
return elem;
|
||||||
}),
|
}),
|
||||||
multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")),
|
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) {
|
getEditor: function (elem) {
|
||||||
elem.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
elem.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
||||||
@@ -541,7 +541,12 @@ var CommandLine = Module("commandline", {
|
|||||||
set: function (value) { this.widgets.multilineInput.collapsed = !value; }
|
set: function (value) { this.widgets.multilineInput.collapsed = !value; }
|
||||||
}),
|
}),
|
||||||
multilineOutputVisible: Modes.boundProperty({
|
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;
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -330,13 +330,15 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
let quote = util.identity;
|
let quote = util.identity;
|
||||||
if (flags.q)
|
if (flags.q)
|
||||||
quote = function quote(obj) typeof obj === "number" ? obj : String.quote(obj);
|
quote = function quote(obj) typeof obj === "number" ? obj : String.quote(obj);
|
||||||
|
if (flags.e)
|
||||||
|
quote = function quote(obj) "";
|
||||||
|
|
||||||
if (set.has(defaults, name))
|
if (set.has(defaults, name))
|
||||||
stack.top.elements.push(quote(defaults[name]));
|
stack.top.elements.push(quote(defaults[name]));
|
||||||
else {
|
else {
|
||||||
stack.top.elements.push(update(
|
stack.top.elements.push(update(
|
||||||
function (obj) obj[name] != null ? quote(obj[name]) : set.has(obj, name) ? "" : unknown(full),
|
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))
|
for (let elem in array.iterValues(stack))
|
||||||
elem.seen[name] = true;
|
elem.seen[name] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user