mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 17:45:46 +01:00
Fix some issues with magically toolbarless popups.
Update issue 148 This fixes some particular issues with these types of popups, but I no longer see the original problem (though window.content is certainly still null).
This commit is contained in:
@@ -143,7 +143,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
return this.statusbar;
|
||||
|
||||
let statusElem = this.statusbar.message;
|
||||
if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth)
|
||||
if (value && statusElem.editor && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth)
|
||||
return this.commandbar;
|
||||
return this.activeGroup.mode;
|
||||
}
|
||||
|
||||
@@ -55,15 +55,17 @@ var Tabs = Module("tabs", {
|
||||
if (dactyl.has("Gecko2")) {
|
||||
let node = function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas);
|
||||
if (!node("dactyl-tab-number")) {
|
||||
let nodes = {};
|
||||
let dom = util.xmlToDom(<xul xmlns:xul={XUL} xmlns:html={XHTML}
|
||||
><xul:hbox highlight="tab-number"><xul:label key="icon" align="center" highlight="TabIconNumber" class="dactyl-tab-icon-number"/></xul:hbox
|
||||
><xul:hbox highlight="tab-number"><html:div key="label" highlight="TabNumber" class="dactyl-tab-number"/></xul:hbox
|
||||
></xul>.*, document, nodes);
|
||||
let img = node("tab-icon-image");
|
||||
img.parentNode.appendChild(dom);
|
||||
tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value));
|
||||
tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i);
|
||||
if (img) {
|
||||
let nodes = {};
|
||||
let dom = util.xmlToDom(<xul xmlns:xul={XUL} xmlns:html={XHTML}
|
||||
><xul:hbox highlight="tab-number"><xul:label key="icon" align="center" highlight="TabIconNumber" class="dactyl-tab-icon-number"/></xul:hbox
|
||||
><xul:hbox highlight="tab-number"><html:div key="label" highlight="TabNumber" class="dactyl-tab-number"/></xul:hbox
|
||||
></xul>.*, document, nodes);
|
||||
img.parentNode.appendChild(dom);
|
||||
tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value));
|
||||
tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i);
|
||||
}
|
||||
}
|
||||
}
|
||||
tab.setAttribute("dactylOrdinal", i + 1);
|
||||
|
||||
Reference in New Issue
Block a user