]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Collapse.js: Tweak active children selector, to search only `.collapsing` as for...
authorGeoSot <geo.sotis@gmail.com>
Mon, 17 Jan 2022 09:31:38 +0000 (11:31 +0200)
committerGeoSot <geo.sotis@gmail.com>
Thu, 7 Apr 2022 11:29:49 +0000 (14:29 +0300)
js/src/collapse.js

index b1088e106fb7e164a00b2a62de510aa49fdae67d..1d2572db0fc1ea26157c053ede63135ae51c32aa 100644 (file)
@@ -41,7 +41,7 @@ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'
 const WIDTH = 'width'
 const HEIGHT = 'height'
 
-const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'
+const SELECTOR_ACTIVES = '.collapse.show, .collapsing'
 const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
 
 const Default = {
@@ -124,7 +124,7 @@ class Collapse extends BaseComponent {
         .map(element => Collapse.getOrCreateInstance(element, { toggle: false }))
     }
 
-    if (activeChildren.length && activeChildren[0]._isTransitioning) {
+    if (activeChildren.some(instance => instance._isTransitioning)) {
       return
     }