Commit 366e1e0a authored by fat's avatar fat
Browse files

only fire hidden once backdrop has been removed

parent 1bf070b4
Showing with 28 additions and 25 deletions
+28 -25
...@@ -138,12 +138,13 @@ ...@@ -138,12 +138,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
...@@ -181,8 +182,8 @@ ...@@ -181,8 +182,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()
......
...@@ -936,12 +936,13 @@ ...@@ -936,12 +936,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
...@@ -979,8 +980,8 @@ ...@@ -979,8 +980,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()
......
This diff is collapsed.
...@@ -138,12 +138,13 @@ ...@@ -138,12 +138,13 @@
}) })
} }
, hideModal: function (that) { , hideModal: function () {
this.$element var that = this
.hide() this.$element.hide()
.trigger('hidden') this.backdrop(function () {
that.removeBackdrop()
this.backdrop() that.$element.trigger('hidden')
})
} }
, removeBackdrop: function () { , removeBackdrop: function () {
...@@ -181,8 +182,8 @@ ...@@ -181,8 +182,8 @@
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
this.removeBackdrop() callback()
} else if (callback) { } else if (callback) {
callback() callback()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment