From 0a81f31cdfd0c5602003c53beaa15ef36ef4a963 Mon Sep 17 00:00:00 2001 From: Sam Foster Date: Thu, 11 Jan 2024 21:36:11 +0000 Subject: [PATCH] Bug 1869928 - Only sync throbber animations for tabs that are animating. r=mconley,tabbrowser-reviewers Differential Revision: https://phabricator.services.mozilla.com/D196537 --- browser/base/content/tabbrowser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/base/content/tabbrowser.js b/browser/base/content/tabbrowser.js index a6a2a8248469..5c32e1c2cd04 100644 --- a/browser/base/content/tabbrowser.js +++ b/browser/base/content/tabbrowser.js @@ -784,11 +784,12 @@ const animations = Array.from( aTab.container.getElementsByTagName("tab") ) + .filter(tab => tab.hasAttribute("busy")) .map(tab => { const throbber = tab.throbber; return throbber ? throbber.getAnimations({ subtree: true }) : []; }) - .reduce((a, b) => a.concat(b)) + .reduce((a, b) => a.concat(b), []) .filter( anim => CSSAnimation.isInstance(anim) &&