From: Aaron Stacy Date: Fri, 23 Sep 2011 13:46:08 +0000 (-0500) Subject: added bug fix for hide-before-show bug X-Git-Tag: v1.4.0~58^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d541eceb51bcc4dff8a42124c0b8d5cdee46d705;p=thirdparty%2Fbootstrap.git 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) --- diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 3267560ed7..aed6288110 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 );