1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 02:24:19 +02:00

Release v5.0.2 (#34276)

* Bump version to v5.0.2.

* Dist
This commit is contained in:
XhmikosR
2021-06-22 21:29:16 +03:00
committed by GitHub
parent 16d5041a76
commit 688bce4fa6
111 changed files with 3152 additions and 2850 deletions

21
js/dist/collapse.js vendored
View File

@@ -1,5 +1,5 @@
/*!
* Bootstrap collapse.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap collapse.js v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -115,9 +115,18 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
} else {
callback();
}
@@ -144,7 +153,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): collapse.js
* Bootstrap (v5.0.2): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -260,7 +269,7 @@
if (actives) {
const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null;
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
if (activesData && activesData._isTransitioning) {
return;
@@ -423,7 +432,7 @@
static collapseInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
let data = Collapse.getInstance(element);
const _config = { ...Default,
...Manipulator__default['default'].getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
@@ -470,7 +479,7 @@
const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine__default['default'].find(selector);
selectorElements.forEach(element => {
const data = Data__default['default'].get(element, DATA_KEY);
const data = Collapse.getInstance(element);
let config;
if (data) {