0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge pull request #13330 from Kronuz/patch-1

Wait for the expected target during a collapse
This commit is contained in:
Chris Rebert 2014-04-15 21:38:45 -07:00
commit d08f7dd807

View File

@ -56,7 +56,11 @@
this.transitioning = 1
var complete = function (e) {
if (e && e.target != this.$element[0]) return
if (e && e.target != this.$element[0]) {
this.$element
.one($.support.transition.end, $.proxy(complete, this))
return
}
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('auto')
@ -92,7 +96,11 @@
this.transitioning = 1
var complete = function (e) {
if (e && e.target != this.$element[0]) return
if (e && e.target != this.$element[0]) {
this.$element
.one($.support.transition.end, $.proxy(complete, this))
return
}
this.transitioning = 0
this.$element
.trigger('hidden.bs.collapse')