]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #11099 - $.collapse() overrides the original dimension of the coll... 13306/head
authorfat <jacobthornton@gmail.com>
Wed, 16 Apr 2014 03:28:08 +0000 (20:28 -0700)
committerfat <jacobthornton@gmail.com>
Wed, 16 Apr 2014 04:16:40 +0000 (21:16 -0700)
js/collapse.js
js/tests/unit/collapse.js

index 6f2205b6ff53352f6c2f2baa439ad80f1c38aecc..235b1a9e6127fc93b0ccfbdd347f78efeef16176 100644 (file)
@@ -59,7 +59,7 @@
       if (e && e.target != this.$element[0]) return
       this.$element
         .removeClass('collapsing')
-        .addClass('collapse in')[dimension]('auto')
+        .addClass('collapse in')[dimension]('')
       this.transitioning = 0
       this.$element.trigger('shown.bs.collapse')
     }
index bead36f91d59a067adf093166611f83473cec9bf..66b2dc1a7ebeb00a1702f1be8a67d02d8ccc048f 100644 (file)
@@ -19,7 +19,7 @@ $(function () {
   test('should show a collapsed element', function () {
     var el = $('<div class="collapse"></div>').collapse('show')
     ok(el.hasClass('in'), 'has class in')
-    ok(/height/.test(el.attr('style')), 'has height set')
+    ok(!/height/.test(el.attr('style')), 'has height reset')
   })
 
   test('should hide a collapsed element', function () {
@@ -51,7 +51,7 @@ $(function () {
         ok(this.style.height == '0px')
       })
       .on('shown.bs.collapse', function () {
-        ok(this.style.height == 'auto')
+        ok(this.style.height === '')
         start()
       })
       .collapse('show')