Bug 1908439 - Drag and drop for moving a group within the window. r=dwalker,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239494
This commit is contained in:
@@ -57,18 +57,21 @@
|
||||
this.initializeAttributeInheritance();
|
||||
|
||||
this.#labelElement = this.querySelector(".tab-group-label");
|
||||
// Mirroring MozTabbrowserTab
|
||||
this.#labelElement.container = gBrowser.tabContainer;
|
||||
this.#labelElement.group = this;
|
||||
|
||||
this.#labelElement.addEventListener("click", this);
|
||||
|
||||
this.#updateLabelAriaAttributes();
|
||||
this.#updateCollapsedAriaAttributes();
|
||||
|
||||
this.addEventListener("TabSelect", this);
|
||||
|
||||
this.#labelElement.addEventListener("contextmenu", e => {
|
||||
e.preventDefault();
|
||||
gBrowser.tabGroupMenu.openEditModal(this);
|
||||
return false;
|
||||
});
|
||||
|
||||
this.#updateLabelAriaAttributes();
|
||||
this.#updateCollapsedAriaAttributes();
|
||||
|
||||
this.addEventListener("TabSelect", this);
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
@@ -174,6 +177,12 @@
|
||||
if (!!val == this.collapsed) {
|
||||
return;
|
||||
}
|
||||
if (val) {
|
||||
for (let tab of this.tabs) {
|
||||
// Unlock tab sizes.
|
||||
tab.style.maxWidth = "";
|
||||
}
|
||||
}
|
||||
this.toggleAttribute("collapsed", val);
|
||||
this.#updateCollapsedAriaAttributes();
|
||||
const eventName = val ? "TabGroupCollapse" : "TabGroupExpand";
|
||||
@@ -203,7 +212,6 @@
|
||||
}
|
||||
);
|
||||
this.#labelElement?.setAttribute("aria-label", tabGroupName);
|
||||
this.#labelElement.group = this;
|
||||
this.#labelElement?.setAttribute("aria-description", tabGroupDescription);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user