зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1714846 - Really hide panels on hide, r=robwu,emilio
Differential Revision: https://phabricator.services.mozilla.com/D132574
This commit is contained in:
Родитель
84ce7c5e68
Коммит
d6767c7c9e
|
@ -406,6 +406,7 @@
|
|||
<panelview id="PanelUI-savetopocket"
|
||||
flex="1" class="PanelUI-subView"
|
||||
remote="true"
|
||||
neverhidden="true"
|
||||
closemenu="none">
|
||||
<vbox class="PanelUI-savetopocket-container">
|
||||
</vbox>
|
||||
|
|
|
@ -463,6 +463,9 @@ const PanelUI = {
|
|||
let tempPanel = document.createXULElement("panel");
|
||||
tempPanel.setAttribute("type", "arrow");
|
||||
tempPanel.setAttribute("id", "customizationui-widget-panel");
|
||||
if (viewNode.hasAttribute("neverhidden")) {
|
||||
tempPanel.setAttribute("neverhidden", "true");
|
||||
}
|
||||
|
||||
tempPanel.setAttribute("class", "cui-widget-panel panel-no-padding");
|
||||
tempPanel.setAttribute("viewId", aViewId);
|
||||
|
|
|
@ -495,6 +495,7 @@ class PanelPopup extends BasePopup {
|
|||
if (extension.remote) {
|
||||
panel.setAttribute("remote", "true");
|
||||
}
|
||||
panel.setAttribute("neverhidden", "true");
|
||||
|
||||
document.getElementById("mainPopupSet").appendChild(panel);
|
||||
|
||||
|
@ -550,6 +551,7 @@ class ViewPopup extends BasePopup {
|
|||
if (remote) {
|
||||
panel.setAttribute("remote", "true");
|
||||
}
|
||||
panel.setAttribute("neverhidden", "true");
|
||||
|
||||
document.getElementById("mainPopupSet").appendChild(panel);
|
||||
return panel;
|
||||
|
|
|
@ -212,6 +212,7 @@ this.browserAction = class extends ExtensionAPI {
|
|||
view.id = this.viewId;
|
||||
view.setAttribute("flex", "1");
|
||||
view.setAttribute("extension", true);
|
||||
view.setAttribute("neverhidden", true);
|
||||
|
||||
document.getElementById("appMenu-viewCache").appendChild(view);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{
|
||||
class MozPanel extends MozElements.MozElementMixin(XULPopupElement) {
|
||||
static get markup() {
|
||||
return `<html:slot part="content" style="display: none"/>`;
|
||||
return `<html:slot part="content" style="display: none !important"/>`;
|
||||
}
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -59,13 +59,9 @@
|
|||
|
||||
this.attachShadow({ mode: "open" });
|
||||
|
||||
if (!this.isArrowPanel) {
|
||||
let slot = document.createElement("slot");
|
||||
slot.part = "content";
|
||||
slot.style.display = "none";
|
||||
this.shadowRoot.appendChild(slot);
|
||||
} else {
|
||||
this.shadowRoot.appendChild(this.constructor.fragment);
|
||||
this.shadowRoot.appendChild(this.constructor.fragment);
|
||||
if (this.hasAttribute("neverhidden")) {
|
||||
this.panelContent.style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,8 +210,8 @@
|
|||
}
|
||||
|
||||
on_popuphidden(event) {
|
||||
if (event.target == this) {
|
||||
this.panelContent.style.display = "none";
|
||||
if (event.target == this && !this.hasAttribute("neverhidden")) {
|
||||
this.panelContent.style.setProperty("display", "none", "important");
|
||||
}
|
||||
if (this.isArrowPanel && event.target == this) {
|
||||
this.removeAttribute("panelopen");
|
||||
|
|
Загрузка…
Ссылка в новой задаче