aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAaron Stacy <[email protected]>2011-09-23 08:46:08 -0500
committerAaron Stacy <[email protected]>2011-09-23 08:46:08 -0500
commitd541eceb51bcc4dff8a42124c0b8d5cdee46d705 (patch)
tree0773ea0afd2d9797366f31d06730a654a41d1af8 /js
parent68605bdd51760a929cc661607f06f479c53b0bee (diff)
downloadbootstrap-d541eceb51bcc4dff8a42124c0b8d5cdee46d705.tar.xz
bootstrap-d541eceb51bcc4dff8a42124c0b8d5cdee46d705.zip
added bug fix for hide-before-show bug
this commit fixes a bug where .modal('hide') is called on a modal object before .modal('show'). this can be viewed here: http://jsfiddle.net/aaronj1335/7hH89/8/ (notice the JS exception that is thrown)
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-modal.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index 3267560ed..aed628811 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -100,6 +100,8 @@
, hide: function (e) {
e && e.preventDefault()
+ if (! this.isShown) return
+
var that = this
this.isShown = false
@@ -235,4 +237,4 @@
})
})
-}( window.jQuery || window.ender ); \ No newline at end of file
+}( window.jQuery || window.ender );