commit 097fef61129031a6873c30cbcb57a95b9e1bd624
parent 4f2aa402bb8f89811d987e0a31d36314906de64e
Author: Nikki Sharpley <nsharpley@mozilla.com>
Date: Wed, 29 Oct 2025 17:50:13 +0000
Bug 1996307 - When "gReduceMotion = true" and tab stacking is configured, background tabs shift incorrectly. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D270397
Diffstat:
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/browser/components/tabbrowser/content/tab-stacking.js b/browser/components/tabbrowser/content/tab-stacking.js
@@ -58,11 +58,6 @@
);
}
let isGrid = this._isContainerVerticalPinnedGrid(tab);
- let animate = !gReduceMotion;
-
- tab._moveTogetherSelectedTabsData = {
- finished: !animate,
- };
tab.toggleAttribute("multiselected-move-together", true);
@@ -179,21 +174,13 @@
// Animate left or top selected tabs
for (let i = 0; i < tabIndex; i++) {
let movingTab = selectedTabs[i];
- if (animate) {
- addAnimationData(movingTab);
- } else {
- gBrowser.moveTabBefore(movingTab, tab);
- }
+ addAnimationData(movingTab);
}
// Animate right or bottom selected tabs
for (let i = selectedTabs.length - 1; i > tabIndex; i--) {
let movingTab = selectedTabs[i];
- if (animate) {
- addAnimationData(movingTab);
- } else {
- gBrowser.moveTabAfter(movingTab, tab);
- }
+ addAnimationData(movingTab);
}
// Slide the relevant tabs to their new position.
@@ -228,15 +215,10 @@
}
finishMoveTogetherSelectedTabs(tab) {
- if (
- !tab._moveTogetherSelectedTabsData ||
- tab._moveTogetherSelectedTabsData.finished
- ) {
+ if (!tab._moveTogetherSelectedTabsData) {
return;
}
- tab._moveTogetherSelectedTabsData.finished = true;
-
let selectedTabs = gBrowser.selectedTabs;
let tabIndex = selectedTabs.indexOf(tab);