1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 03:15:30 +02:00

chore: Formatted, b=(no-bug), c=folders

This commit is contained in:
Mr. M 2025-05-17 14:32:46 +02:00
parent 7291b07a09
commit c3f9fe99a5
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
2 changed files with 23 additions and 17 deletions

View file

@ -1,9 +1,9 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index 670fe2b309863102f63246e26194c8958e28bbb7..55e699a1e0c12e3aae938b8d9a053259a545efbb 100644
index dd6bae196ea7af87eb9fd4fb10082f6caaa84964..e637b1d97234c9f59439eaeeac769b010b1ea230 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -9,10 +9,13 @@
{
@@ -13,10 +13,13 @@
class MozTabbrowserTabGroup extends MozXULElement {
static markup = `
- <vbox class="tab-group-label-container" pack="center">
@ -19,19 +19,19 @@ index 670fe2b309863102f63246e26194c8958e28bbb7..55e699a1e0c12e3aae938b8d9a053259
`;
/** @type {string} */
@@ -57,7 +60,7 @@
this.initializeAttributeInheritance();
@@ -65,7 +68,7 @@
this.#labelElement.container = gBrowser.tabContainer;
this.#labelElement.group = this;
this.#labelElement = this.querySelector(".tab-group-label");
- this.#labelElement.addEventListener("click", this);
+ this.querySelector(".tab-group-label-container").addEventListener("click", this);
this.#updateLabelAriaAttributes();
this.#updateCollapsedAriaAttributes();
@@ -69,6 +72,10 @@
this.#labelElement.addEventListener("contextmenu", e => {
e.preventDefault();
gBrowser.tabGroupMenu.openEditModal(this);
return false;
});
@@ -76,6 +79,10 @@
this.#updateCollapsedAriaAttributes();
this.addEventListener("TabSelect", this);
+
+ this.appendChild = function (child) {
+ this.querySelector('.tab-group-container').appendChild(child);
@ -39,11 +39,13 @@ index 670fe2b309863102f63246e26194c8958e28bbb7..55e699a1e0c12e3aae938b8d9a053259
}
disconnectedCallback() {
@@ -213,7 +220,21 @@
@@ -224,8 +231,22 @@
this.#labelElement?.setAttribute("aria-expanded", ariaExpanded);
}
get tabs() {
- get tabs() {
- return Array.from(this.children).filter(node => node.matches("tab"));
+ get tabs() {
+ // add other group tabs if they are under this group
+ let childs = Array.from(this.querySelector('.tab-group-container').children);
+ for (let item of childs) {
@ -62,7 +64,7 @@ index 670fe2b309863102f63246e26194c8958e28bbb7..55e699a1e0c12e3aae938b8d9a053259
}
/**
@@ -270,7 +291,7 @@
@@ -304,7 +325,7 @@
* @param {PointerEvent} event
*/
on_click(event) {