Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2018-03-11 18:18:56 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-02-20 23:05:45 +0300
commit7eddee286eb76da4d057a59706e4c512206dab45 (patch)
tree5319cd291c015fcec49e2af0cb1c890d0d966927 /js/src/collapse.js
parent0263d1742ce8ad25f0f2de30beebae69b2f55f10 (diff)
remove old references to jquery and some fixes
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index 31200c33a8..7d6aa30ed8 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -141,12 +141,11 @@ class Collapse {
}
}
+ const container = SelectorEngine.findOne(this._selector)
if (actives) {
- const tempActiveData = actives.filter((elem) => {
- const container = SelectorEngine.findOne(this._selector)
- return !container.contains(elem)
- })
+ const tempActiveData = actives.filter((elem) => container !== elem)
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null
+
if (activesData && activesData._isTransitioning) {
return
}
@@ -159,14 +158,14 @@ class Collapse {
if (actives) {
actives.forEach((elemActive) => {
- const container = SelectorEngine.findOne(this._selector)
- if (!container.contains(elemActive)) {
+ if (container !== elemActive) {
Collapse._collapseInterface(elemActive, 'hide')
}
+
+ if (!activesData) {
+ Data.setData(elemActive, DATA_KEY, null)
+ }
})
- if (!activesData) {
- Data.setData(actives[0], DATA_KEY, null)
- }
}
const dimension = this._getDimension()