]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
added bug fix for hide-before-show bug
authorAaron Stacy <aaron.r.stacy@gmail.com>
Fri, 23 Sep 2011 13:46:08 +0000 (08:46 -0500)
committerAaron Stacy <aaron.r.stacy@gmail.com>
Fri, 23 Sep 2011 13:46:08 +0000 (08:46 -0500)
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)

js/bootstrap-modal.js

index 3267560ed7e01748b80c225d0be0346e5b66120a..aed62881102b5cc2be7ec1b7c9a4b7b79e27c9ec 100644 (file)
     , hide: function (e) {
         e && e.preventDefault()
 
+        if (! this.isShown) return
+
         var that = this
         this.isShown = false
 
     })
   })
 
-}( window.jQuery || window.ender );
\ No newline at end of file
+}( window.jQuery || window.ender );