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 488c6b4 commit d081102
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
6 changes: 4 additions & 2 deletions dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.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
2 changes: 1 addition & 1 deletion dist/js/bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/assets/js/customize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/raw-files.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/js/bootstrap.min.js

Large diffs are not rendered by default.

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')

This comment has been minimized.

Copy link
@cvrebert

cvrebert Mar 25, 2014

Collaborator

the string doesn't need a space or a dot or anything?

.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
2 changes: 1 addition & 1 deletion test-infra/npm-shrinkwrap.canonical.json

Large diffs are not rendered by default.

0 comments on commit d081102

Please sign in to comment.