Skip to content

Commit

Permalink
fixes #13157 - Collapse plugin - issues with transition end event bub…
Browse files Browse the repository at this point in the history
…bling
  • Loading branch information
fat committed Mar 25, 2014
1 parent acf5707 commit ac904f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@
.addClass('collapse in')
[dimension]('auto')
this.transitioning = 0
this.$element.trigger('shown.bs.collapse')
this.$element
.off($.support.transition.end + 'bs.collapse')
.trigger('shown.bs.collapse')
}

if (!$.support.transition) return complete.call(this)

var scrollSize = $.camelCase(['scroll', dimension].join('-'))

this.$element
.one($.support.transition.end, $.proxy(complete, this))
.on($.support.transition.end + 'bs.collapse', $.proxy(complete, this))
.emulateTransitionEnd(350)
[dimension](this.$element[0][scrollSize])
}
Expand Down

0 comments on commit ac904f7

Please sign in to comment.