diff options
| author | fat <[email protected]> | 2013-02-07 20:13:40 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-02-07 20:13:40 -0800 |
| commit | 366e1e0a6d1442b8cf8546a27bac44a841b892a2 (patch) | |
| tree | f586be4f897da52357425f81fd793fb6eddf46b6 /js | |
| parent | 1bf070b4ce5ee40e4d248053d109c179bb42caf9 (diff) | |
| download | bootstrap-366e1e0a6d1442b8cf8546a27bac44a841b892a2.tar.xz bootstrap-366e1e0a6d1442b8cf8546a27bac44a841b892a2.zip | |
only fire hidden once backdrop has been removed
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-modal.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 379da6087..b5ffa95b3 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -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 () { @@ -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() |
