Skip to content

Commit

Permalink
Only hide modal on transitionend if the event originates from the mod…
Browse files Browse the repository at this point in the history
…al; fixes twbs#13223
  • Loading branch information
hnrch02 committed Apr 25, 2014
1 parent e0d1e40 commit d5fb11f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@

$.support.transition && this.$element.hasClass('fade') ?
this.$element
.one($.support.transition.end, $.proxy(this.hideModal, this))
.one($.support.transition.end, $.proxy(function (e) {
if (!$(e.target).is(this.$element)) return
this.hideModal()
}, this))
.emulateTransitionEnd(300) :
this.hideModal()
}
Expand Down

0 comments on commit d5fb11f

Please sign in to comment.