This commit is contained in:
Mr. M
2025-08-25 10:09:52 +02:00
7 changed files with 115 additions and 74 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b597146f664b34 100644 index caea196b22b4689f55780a528661d87b52f4e728..c107c803d0820a209c0859745dcc8370294eb7b2 100644
--- a/browser/components/tabbrowser/content/tabgroup.js --- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js +++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -13,10 +13,12 @@ @@ -13,10 +13,12 @@
@@ -18,7 +18,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
<vbox class="tab-group-overflow-count-container" pack="center"> <vbox class="tab-group-overflow-count-container" pack="center">
<label class="tab-group-overflow-count" role="button" /> <label class="tab-group-overflow-count" role="button" />
</vbox> </vbox>
@@ -57,20 +59,26 @@ @@ -57,20 +59,28 @@
} }
connectedCallback() { connectedCallback() {
@@ -30,6 +30,8 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
+ detail: this, + detail: this,
+ }) + })
+ ); + );
+ } else if (!this.group) {
+ this._lastGroup = null;
+ } + }
// Always set the mutation observer to listen for tab change events, even // Always set the mutation observer to listen for tab change events, even
// if we are already initialized. // if we are already initialized.
@@ -49,7 +51,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
this._initialized = true; this._initialized = true;
this.saveOnWindowClose = true; this.saveOnWindowClose = true;
@@ -97,11 +105,14 @@ @@ -97,11 +107,14 @@
this.#labelElement.container = gBrowser.tabContainer; this.#labelElement.container = gBrowser.tabContainer;
this.#labelElement.group = this; this.#labelElement.group = this;
@@ -69,7 +71,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
this.#updateLabelAriaAttributes(); this.#updateLabelAriaAttributes();
this.#updateCollapsedAriaAttributes(); this.#updateCollapsedAriaAttributes();
@@ -127,6 +138,8 @@ @@ -127,6 +140,8 @@
// mounts after getting created by `Tabbrowser.adoptTabGroup`. // mounts after getting created by `Tabbrowser.adoptTabGroup`.
this.#wasCreatedByAdoption = false; this.#wasCreatedByAdoption = false;
} }
@@ -78,7 +80,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
resetDefaultGroupName = () => { resetDefaultGroupName = () => {
this.#defaultGroupName = ""; this.#defaultGroupName = "";
@@ -197,7 +210,10 @@ @@ -197,7 +212,10 @@
} }
}); });
} }
@@ -90,7 +92,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
} }
get color() { get color() {
@@ -338,12 +354,61 @@ @@ -338,12 +356,61 @@
tabGroupName, tabGroupName,
}) })
.then(result => { .then(result => {
@@ -154,7 +156,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
} }
/** /**
@@ -373,7 +438,7 @@ @@ -373,7 +440,7 @@
*/ */
addTabs(tabs, metricsContext) { addTabs(tabs, metricsContext) {
for (let tab of tabs) { for (let tab of tabs) {
@@ -163,7 +165,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
tab.ownerGlobal.gBrowser.unpinTab(tab); tab.ownerGlobal.gBrowser.unpinTab(tab);
} }
let tabToMove = let tabToMove =
@@ -437,7 +502,7 @@ @@ -437,7 +504,7 @@
*/ */
on_click(event) { on_click(event) {
let isToggleElement = let isToggleElement =
@@ -172,7 +174,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..9c1e141b6b2121d32f30c82862b59714
event.target === this.#overflowCountLabel; event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) { if (isToggleElement && event.button === 0) {
event.preventDefault(); event.preventDefault();
@@ -470,5 +535,6 @@ @@ -470,5 +537,6 @@
} }
} }

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c82929be7 100644 index e47f735e4e4563c9b7537944628418d1478c068d..ca542ede66aed5bcd6ecfc5c3d5fce164f06b427 100644
--- a/browser/components/tabbrowser/content/tabs.js --- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js +++ b/browser/components/tabbrowser/content/tabs.js
@@ -332,7 +332,7 @@ @@ -332,7 +332,7 @@
@@ -162,7 +162,15 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
this.#keepTabSizeLocked = false; this.#keepTabSizeLocked = false;
this._unlockTabSizing(); this._unlockTabSizing();
this.#expandGroupOnDrop(draggedTab); this.#expandGroupOnDrop(draggedTab);
@@ -1640,7 +1670,7 @@ @@ -1582,7 +1612,6 @@
this.toggleAttribute("overflow", true);
this._updateCloseButtons();
- this._handleTabSelect(true);
document
.getElementById("tab-preview-panel")
@@ -1640,7 +1669,7 @@
} }
get newTabButton() { get newTabButton() {
@@ -171,7 +179,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
get verticalMode() { get verticalMode() {
@@ -1656,6 +1686,7 @@ @@ -1656,6 +1685,7 @@
} }
get overflowing() { get overflowing() {
@@ -179,7 +187,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
return this.hasAttribute("overflow"); return this.hasAttribute("overflow");
} }
@@ -1664,26 +1695,54 @@ @@ -1664,26 +1694,54 @@
if (this.#allTabs) { if (this.#allTabs) {
return this.#allTabs; return this.#allTabs;
} }
@@ -241,7 +249,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
/** /**
@@ -1750,32 +1809,27 @@ @@ -1750,32 +1808,27 @@
let elementIndex = 0; let elementIndex = 0;
@@ -283,7 +291,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
return this.#focusableItems; return this.#focusableItems;
} }
@@ -1783,6 +1837,7 @@ @@ -1783,6 +1836,7 @@
_invalidateCachedTabs() { _invalidateCachedTabs() {
this.#allTabs = null; this.#allTabs = null;
this._invalidateCachedVisibleTabs(); this._invalidateCachedVisibleTabs();
@@ -291,7 +299,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
_invalidateCachedVisibleTabs() { _invalidateCachedVisibleTabs() {
@@ -1798,8 +1853,8 @@ @@ -1798,8 +1852,8 @@
#isContainerVerticalPinnedGrid(tab) { #isContainerVerticalPinnedGrid(tab) {
return ( return (
this.verticalMode && this.verticalMode &&
@@ -302,7 +310,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
!this.expandOnHover !this.expandOnHover
); );
} }
@@ -1815,7 +1870,7 @@ @@ -1815,7 +1869,7 @@
if (node == null) { if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox. // We have a container for non-tab elements at the end of the scrollbox.
@@ -311,7 +319,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
node.before(tab); node.before(tab);
@@ -1910,7 +1965,7 @@ @@ -1910,7 +1964,7 @@
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and // There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs); // for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
// Attach the long click popup to all of them. // Attach the long click popup to all of them.
@@ -320,7 +328,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
const newTab2 = this.newTabButton; const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById( const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button" "vertical-tabs-newtab-button"
@@ -2005,10 +2060,12 @@ @@ -2005,10 +2059,12 @@
_handleTabSelect(aInstant) { _handleTabSelect(aInstant) {
let selectedTab = this.selectedItem; let selectedTab = this.selectedItem;
@@ -333,7 +341,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
selectedTab._notselectedsinceload = false; selectedTab._notselectedsinceload = false;
} }
@@ -2152,6 +2209,7 @@ @@ -2152,6 +2208,7 @@
when the tab is first selected to be dragged. when the tab is first selected to be dragged.
*/ */
#updateTabStylesOnDrag(tab) { #updateTabStylesOnDrag(tab) {
@@ -341,7 +349,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let isPinned = tab.pinned; let isPinned = tab.pinned;
let numPinned = gBrowser.pinnedTabCount; let numPinned = gBrowser.pinnedTabCount;
let allTabs = this.ariaFocusableItems; let allTabs = this.ariaFocusableItems;
@@ -2385,7 +2443,7 @@ @@ -2385,7 +2442,7 @@
return; return;
} }
@@ -350,7 +358,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let directionX = screenX > dragData.animLastScreenX; let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY; let directionY = screenY > dragData.animLastScreenY;
@@ -2394,6 +2452,8 @@ @@ -2394,6 +2451,8 @@
let { width: tabWidth, height: tabHeight } = let { width: tabWidth, height: tabHeight } =
draggedTab.getBoundingClientRect(); draggedTab.getBoundingClientRect();
@@ -359,7 +367,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let shiftSizeX = tabWidth * movingTabs.length; let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight; let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth; dragData.tabWidth = tabWidth;
@@ -2430,8 +2490,8 @@ @@ -2430,8 +2489,8 @@
let lastBoundX = let lastBoundX =
lastTabInRow.screenX + lastTabInRow.screenX +
lastTabInRow.getBoundingClientRect().width - lastTabInRow.getBoundingClientRect().width -
@@ -370,7 +378,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
translateX = Math.min(Math.max(translateX, firstBoundX), lastBoundX); translateX = Math.min(Math.max(translateX, firstBoundX), lastBoundX);
translateY = Math.min(Math.max(translateY, firstBoundY), lastBoundY); translateY = Math.min(Math.max(translateY, firstBoundY), lastBoundY);
@@ -2547,7 +2607,7 @@ @@ -2547,7 +2606,7 @@
} }
dragData.animDropElementIndex = newIndex; dragData.animDropElementIndex = newIndex;
@@ -379,7 +387,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
dragData.dropBefore = newIndex < tabs.length; dragData.dropBefore = newIndex < tabs.length;
// Shift background tabs to leave a gap where the dragged tab // Shift background tabs to leave a gap where the dragged tab
@@ -2580,13 +2640,18 @@ @@ -2580,13 +2639,18 @@
this.#clearDragOverCreateGroupTimer(); this.#clearDragOverCreateGroupTimer();
@@ -402,7 +410,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
if (this.#rtlMode) { if (this.#rtlMode) {
tabs.reverse(); tabs.reverse();
@@ -2597,7 +2662,7 @@ @@ -2597,7 +2661,7 @@
let screenAxis = this.verticalMode ? "screenY" : "screenX"; let screenAxis = this.verticalMode ? "screenY" : "screenX";
let size = this.verticalMode ? "height" : "width"; let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX"; let translateAxis = this.verticalMode ? "translateY" : "translateX";
@@ -411,7 +419,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let translateX = event.screenX - dragData.screenX; let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY; let translateY = event.screenY - dragData.screenY;
@@ -2607,10 +2672,16 @@ @@ -2607,10 +2671,16 @@
dragData.translateY = translateY; dragData.translateY = translateY;
// Move the dragged tab based on the mouse position. // Move the dragged tab based on the mouse position.
@@ -430,7 +438,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let endEdge = ele => ele[screenAxis] + bounds(ele)[size]; let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
let lastMovingTabScreen = endEdge(lastMovingTab); let lastMovingTabScreen = endEdge(lastMovingTab);
let firstMovingTabScreen = firstMovingTab[screenAxis]; let firstMovingTabScreen = firstMovingTab[screenAxis];
@@ -2619,6 +2690,7 @@ @@ -2619,6 +2689,7 @@
// Constrain the range over which the moving tabs can move between the first and last tab // Constrain the range over which the moving tabs can move between the first and last tab
let firstBound = firstTab[screenAxis] - firstMovingTabScreen; let firstBound = firstTab[screenAxis] - firstMovingTabScreen;
let lastBound = endEdge(lastTab) - lastMovingTabScreen; let lastBound = endEdge(lastTab) - lastMovingTabScreen;
@@ -438,7 +446,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
// Center the tab under the cursor if the tab is not under the cursor while dragging // Center the tab under the cursor if the tab is not under the cursor while dragging
if ( if (
@@ -2636,6 +2708,9 @@ @@ -2636,6 +2707,9 @@
// Shift the `.tab-group-label-container` to shift the label element. // Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement; item = item.parentElement;
} }
@@ -448,7 +456,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
item.style.transform = `${translateAxis}(${translate}px)`; item.style.transform = `${translateAxis}(${translate}px)`;
} }
@@ -2773,6 +2848,9 @@ @@ -2773,6 +2847,9 @@
break; break;
} }
let element = tabs[mid]; let element = tabs[mid];
@@ -458,7 +466,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let elementForSize = isTabGroupLabel(element) let elementForSize = isTabGroupLabel(element)
? element.parentElement ? element.parentElement
: element; : element;
@@ -2792,6 +2870,8 @@ @@ -2792,6 +2869,8 @@
}; };
let dropElement = getOverlappedElement(); let dropElement = getOverlappedElement();
@@ -467,7 +475,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
let newDropElementIndex; let newDropElementIndex;
if (dropElement) { if (dropElement) {
@@ -2856,7 +2936,10 @@ @@ -2856,7 +2935,10 @@
let shouldCreateGroupOnDrop; let shouldCreateGroupOnDrop;
let dropBefore; let dropBefore;
if (dropElement) { if (dropElement) {
@@ -479,7 +487,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
? dropElement.parentElement ? dropElement.parentElement
: dropElement; : dropElement;
@@ -2876,7 +2959,7 @@ @@ -2876,7 +2958,7 @@
? Services.prefs.getIntPref( ? Services.prefs.getIntPref(
"browser.tabs.dragDrop.moveOverThresholdPercent" "browser.tabs.dragDrop.moveOverThresholdPercent"
) / 100 ) / 100
@@ -488,7 +496,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold)); moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold));
let shouldMoveOver = overlapPercent > moveOverThreshold; let shouldMoveOver = overlapPercent > moveOverThreshold;
if (logicalForward && shouldMoveOver) { if (logicalForward && shouldMoveOver) {
@@ -2908,44 +2991,21 @@ @@ -2908,44 +2990,21 @@
// If dragging a group over another group, don't make it look like it is // If dragging a group over another group, don't make it look like it is
// possible to drop the dragged group inside the other group. // possible to drop the dragged group inside the other group.
@@ -538,7 +546,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
// When dragging tab(s) over an ungrouped tab, signal to the user // When dragging tab(s) over an ungrouped tab, signal to the user
// that dropping the tab(s) will create a new tab group. // that dropping the tab(s) will create a new tab group.
shouldCreateGroupOnDrop = shouldCreateGroupOnDrop =
@@ -2955,12 +3015,6 @@ @@ -2955,12 +3014,6 @@
overlapPercent > dragOverGroupingThreshold; overlapPercent > dragOverGroupingThreshold;
if (shouldCreateGroupOnDrop) { if (shouldCreateGroupOnDrop) {
@@ -551,7 +559,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} else { } else {
this.removeAttribute("movingtab-createGroup"); this.removeAttribute("movingtab-createGroup");
document document
@@ -2987,19 +3041,14 @@ @@ -2987,19 +3040,14 @@
dropElement = dropElementGroup; dropElement = dropElementGroup;
colorCode = undefined; colorCode = undefined;
} else if (isTabGroupLabel(dropElement)) { } else if (isTabGroupLabel(dropElement)) {
@@ -579,7 +587,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
this.#setDragOverGroupColor(colorCode); this.#setDragOverGroupColor(colorCode);
this.toggleAttribute("movingtab-ungroup", !colorCode); this.toggleAttribute("movingtab-ungroup", !colorCode);
@@ -3017,19 +3066,28 @@ @@ -3017,19 +3065,28 @@
dragData.dropElement = dropElement; dragData.dropElement = dropElement;
dragData.dropBefore = dropBefore; dragData.dropBefore = dropBefore;
dragData.animDropElementIndex = newDropElementIndex; dragData.animDropElementIndex = newDropElementIndex;
@@ -610,7 +618,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
} }
item.style.transform = transform; item.style.transform = transform;
} }
@@ -3082,12 +3140,14 @@ @@ -3082,12 +3139,14 @@
); );
} }
@@ -627,7 +635,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
for (let item of this.ariaFocusableItems) { for (let item of this.ariaFocusableItems) {
if (isTabGroupLabel(item)) { if (isTabGroupLabel(item)) {
@@ -3095,6 +3155,18 @@ @@ -3095,6 +3154,18 @@
item = item.parentElement; item = item.parentElement;
} }
item.style.transform = ""; item.style.transform = "";
@@ -646,7 +654,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
item.removeAttribute("dragover-createGroup"); item.removeAttribute("dragover-createGroup");
} }
this.removeAttribute("movingtab-createGroup"); this.removeAttribute("movingtab-createGroup");
@@ -3122,7 +3194,6 @@ @@ -3122,7 +3193,6 @@
"tab-group-label-container" "tab-group-label-container"
)) { )) {
label.style.width = ""; label.style.width = "";
@@ -654,7 +662,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
label.style.left = ""; label.style.left = "";
label.style.top = ""; label.style.top = "";
label.removeAttribute("dragtarget"); label.removeAttribute("dragtarget");
@@ -3198,7 +3269,7 @@ @@ -3198,7 +3268,7 @@
let postTransitionCleanup = () => { let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false; movingTab._moveTogetherSelectedTabsData.animate = false;
}; };
@@ -663,7 +671,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
postTransitionCleanup(); postTransitionCleanup();
} else { } else {
let onTransitionEnd = transitionendEvent => { let onTransitionEnd = transitionendEvent => {
@@ -3371,7 +3442,7 @@ @@ -3371,7 +3441,7 @@
} }
_notifyBackgroundTab(aTab) { _notifyBackgroundTab(aTab) {
@@ -672,7 +680,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
return; return;
} }
@@ -3480,7 +3551,10 @@ @@ -3480,7 +3550,10 @@
#getDragTarget(event, { ignoreSides = false } = {}) { #getDragTarget(event, { ignoreSides = false } = {}) {
let { target } = event; let { target } = event;
while (target) { while (target) {
@@ -684,7 +692,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..8af76f08278e5db4029bf060bbf4ea4c
break; break;
} }
target = target.parentNode; target = target.parentNode;
@@ -3497,6 +3571,9 @@ @@ -3497,6 +3570,9 @@
return null; return null;
} }
} }

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs
index 3e796cb6586ad39257a29c2a6da1d0415f4c2676..dd883f81612d9dc892e720b63e2793e43b9686b3 100644 index 3e796cb6586ad39257a29c2a6da1d0415f4c2676..98b639c726efee850456a3af8a01f0ce66423ba0 100644
--- a/toolkit/modules/ShortcutUtils.sys.mjs --- a/toolkit/modules/ShortcutUtils.sys.mjs
+++ b/toolkit/modules/ShortcutUtils.sys.mjs +++ b/toolkit/modules/ShortcutUtils.sys.mjs
@@ -140,6 +140,7 @@ export var ShortcutUtils = { @@ -140,6 +140,7 @@ export var ShortcutUtils = {
@@ -10,3 +10,17 @@ index 3e796cb6586ad39257a29c2a6da1d0415f4c2676..dd883f81612d9dc892e720b63e2793e4
key = keyAttribute.toUpperCase(); key = keyAttribute.toUpperCase();
} }
@@ -373,13 +374,11 @@ export var ShortcutUtils = {
}
break;
case event.DOM_VK_UP: // fall through
- case event.DOM_VK_LEFT:
if (metaAltAccel) {
return ShortcutUtils.PREVIOUS_TAB;
}
break;
case event.DOM_VK_DOWN: // fall through
- case event.DOM_VK_RIGHT:
if (metaAltAccel) {
return ShortcutUtils.NEXT_TAB;
}

View File

@@ -173,11 +173,14 @@
return; return;
} }
Services.prefs.setStringPref('zen.updates.last-build-id', appID); Services.prefs.setStringPref('zen.updates.last-build-id', appID);
if (gReduceMotion) return;
await gZenWorkspaces.promiseInitialized; await gZenWorkspaces.promiseInitialized;
const appWrapper = document.getElementById('zen-main-app-wrapper'); const appWrapper = document.getElementById('zen-main-app-wrapper');
const element = document.createElement('div'); const element = document.createElement('div');
element.id = 'zen-update-animation'; element.id = 'zen-update-animation';
requestIdleCallback(() => {
if (gReduceMotion) {
return;
}
appWrapper.appendChild(element); appWrapper.appendChild(element);
gZenUIManager.motion gZenUIManager.motion
.animate( .animate(
@@ -193,6 +196,7 @@
.then(() => { .then(() => {
element.remove(); element.remove();
}); });
});
} }
})(); })();

View File

@@ -442,7 +442,7 @@
opacity: 0, opacity: 0,
height: 0, height: 0,
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
}); });
@@ -454,7 +454,7 @@
{ {
marginTop: -(heightUntilSelected + 4 * (selectedItems.length === 0 ? 1 : 0)), marginTop: -(heightUntilSelected + 4 * (selectedItems.length === 0 ? 1 : 0)),
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
@@ -554,7 +554,7 @@
opacity: 1, opacity: 1,
height: '', height: '',
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
}); });
@@ -567,7 +567,7 @@
opacity: 0, opacity: 0,
height: 0, height: 0,
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
}); });
@@ -581,7 +581,7 @@
marginTop: 0, marginTop: 0,
}, },
{ {
duration: 0.1, duration: 0.12,
ease: 'easeInOut', ease: 'easeInOut',
} }
) )
@@ -685,6 +685,7 @@
} }
const canInsertBefore = const canInsertBefore =
!isFromToolbar &&
!triggerTab.hasAttribute('zen-essential') && !triggerTab.hasAttribute('zen-essential') &&
!triggerTab?.group?.hasAttribute('split-view-group') && !triggerTab?.group?.hasAttribute('split-view-group') &&
this.canDropElement({ isZenFolder: true }, triggerTab); this.canDropElement({ isZenFolder: true }, triggerTab);
@@ -1369,7 +1370,7 @@
{ {
marginTop: [curMarginTop, 0], marginTop: [curMarginTop, 0],
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
for (const tab of activeForGroup) { for (const tab of activeForGroup) {
@@ -1421,7 +1422,7 @@
opacity: 1, opacity: 1,
height: '', height: '',
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
} }
@@ -1434,7 +1435,7 @@
opacity: 0, opacity: 0,
height: 0, height: 0,
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
); );
} }
@@ -1447,7 +1448,7 @@
{ {
marginTop: [curMarginTop, 0], marginTop: [curMarginTop, 0],
}, },
{ duration: 0.1, ease: 'easeInOut' } { duration: 0.12, ease: 'easeInOut' }
) )
.then(() => { .then(() => {
tabsContainer.style.overflow = ''; tabsContainer.style.overflow = '';

View File

@@ -609,10 +609,17 @@ class nsZenKeyboardShortcutsLoader {
let keySet = document.getElementById(ZEN_MAIN_KEYSET_ID); let keySet = document.getElementById(ZEN_MAIN_KEYSET_ID);
let newShortcutList = []; let newShortcutList = [];
const correctDefaultShortcut = (shortcut) => {
if (shortcut.getID() === 'key_savePage') {
shortcut.setModifiers(nsKeyShortcutModifiers.fromObject({ accel: true, alt: true }));
}
};
// Firefox's standard keyset. Reverse order to keep the order of the keys // Firefox's standard keyset. Reverse order to keep the order of the keys
for (let i = keySet.children.length - 1; i >= 0; i--) { for (let i = keySet.children.length - 1; i >= 0; i--) {
let key = keySet.children[i]; let key = keySet.children[i];
let parsed = KeyShortcut.parseFromXHTML(key); let parsed = KeyShortcut.parseFromXHTML(key);
correctDefaultShortcut(parsed);
newShortcutList.push(parsed); newShortcutList.push(parsed);
} }
@@ -620,10 +627,10 @@ class nsZenKeyboardShortcutsLoader {
newShortcutList.push( newShortcutList.push(
new KeyShortcut( new KeyShortcut(
'zen-compact-mode-toggle', 'zen-compact-mode-toggle',
'C', 'S',
'', '',
ZEN_COMPACT_MODE_SHORTCUTS_GROUP, ZEN_COMPACT_MODE_SHORTCUTS_GROUP,
nsKeyShortcutModifiers.fromObject({ alt: true }), nsKeyShortcutModifiers.fromObject({ accel: true }),
'cmd_zenCompactModeToggle', 'cmd_zenCompactModeToggle',
'zen-compact-mode-shortcut-toggle' 'zen-compact-mode-shortcut-toggle'
) )
@@ -671,7 +678,7 @@ class nsZenKeyboardShortcutsLoader {
'', '',
'VK_RIGHT', 'VK_RIGHT',
ZEN_WORKSPACE_SHORTCUTS_GROUP, ZEN_WORKSPACE_SHORTCUTS_GROUP,
nsKeyShortcutModifiers.fromObject({ accel: true }), nsKeyShortcutModifiers.fromObject({ alt: true, accel: true }),
'cmd_zenWorkspaceForward', 'cmd_zenWorkspaceForward',
'zen-workspace-shortcut-forward' 'zen-workspace-shortcut-forward'
) )
@@ -682,7 +689,7 @@ class nsZenKeyboardShortcutsLoader {
'', '',
'VK_LEFT', 'VK_LEFT',
ZEN_WORKSPACE_SHORTCUTS_GROUP, ZEN_WORKSPACE_SHORTCUTS_GROUP,
nsKeyShortcutModifiers.fromObject({ accel: true }), nsKeyShortcutModifiers.fromObject({ alt: true, accel: true }),
'cmd_zenWorkspaceBackward', 'cmd_zenWorkspaceBackward',
'zen-workspace-shortcut-backward' 'zen-workspace-shortcut-backward'
) )

View File

@@ -215,6 +215,11 @@
font-weight: 600; font-weight: 600;
align-items: center; align-items: center;
margin: 0; margin: 0;
max-height: 16px;
@media (-moz-platform: windows) {
margin-top: -3px;
}
} }
.zen-workspaces-actions { .zen-workspaces-actions {