Skip to content

Commit

Permalink
only fire hidden once backdrop has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Feb 8, 2013
1 parent 1bf070b commit 366e1e0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
17 changes: 9 additions & 8 deletions docs/assets/js/bootstrap-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@
})
}

, hideModal: function (that) {
this.$element
.hide()
.trigger('hidden')

this.backdrop()
, hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}

, removeBackdrop: function () {
Expand Down Expand Up @@ -181,8 +182,8 @@
this.$backdrop.removeClass('in')

$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
this.removeBackdrop()
this.$backdrop.one($.support.transition.end, callback) :
callback()

} else if (callback) {
callback()
Expand Down
17 changes: 9 additions & 8 deletions docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,12 +936,13 @@
})
}

, hideModal: function (that) {
this.$element
.hide()
.trigger('hidden')

this.backdrop()
, hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}

, removeBackdrop: function () {
Expand Down Expand Up @@ -979,8 +980,8 @@
this.$backdrop.removeClass('in')

$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
this.removeBackdrop()
this.$backdrop.one($.support.transition.end, callback) :
callback()

} else if (callback) {
callback()
Expand Down
Loading

0 comments on commit 366e1e0

Please sign in to comment.