From: GeoSot Date: Mon, 17 Jan 2022 09:31:38 +0000 (+0200) Subject: Collapse.js: Tweak active children selector, to search only `.collapsing` as for... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2b32f1f5cde2c18d08e1e335108be19f6286fcb;p=thirdparty%2Fbootstrap.git Collapse.js: Tweak active children selector, to search only `.collapsing` as for ui reasons, during show/hide, we toggle `.collapse` class too --- diff --git a/js/src/collapse.js b/js/src/collapse.js index b1088e106f..1d2572db0f 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -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 }