Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap-collapse.js - 2.0.4 - transition function #3773

Closed
stevematyas opened this issue Jun 8, 2012 · 2 comments
Closed

bootstrap-collapse.js - 2.0.4 - transition function #3773

stevematyas opened this issue Jun 8, 2012 · 2 comments
Labels

Comments

@stevematyas
Copy link

Chrome Linux|OSX 19.x.x.x fail to execute the inner complete() function which, resets the this.transitioning = 0 (false). The impact of which is that you are unable to re-expand a previously open & closed accordian-group element

Line numbers are off a bit due to other mods I've made locally.

$ svn diff resources/
Index: resources/bootstrap/js/bootstrap.js
===================================================================
--- resources/bootstrap/js/bootstrap.js (revision 32788)
+++ resources/bootstrap/js/bootstrap.js (working copy)
@@ -510,7 +510,8 @@

   , transition: function (method, startEvent, completeEvent) {
       var that = this
-        , complete = function () {
+      
+      var complete = function (that) {
             if (startEvent.type == 'show') that.reset()
             that.transitioning = 0
             that.$element.trigger(completeEvent)
@@ -525,8 +526,8 @@
       this.$element[method]('in')

       $.support.transition && this.$element.hasClass('collapse') ?
-        this.$element.one($.support.transition.end, complete) :
-        complete()
+        this.$element.one($.support.transition.end, complete(this)) :
+        complete(this)
     }

   , toggle: function () {
@kmiyashiro
Copy link

Can you try replacing line 55 with if (this.transitioning || this.$element.hasClass('in')) return and line 75 with if (this.transitioning || !this.$element.hasClass('in')) return ? I have a feeling that transitioning is getting stuck as 1 if you try to show/hide an already shown/hidden collapsible. Unfortunately, I can't reproduce this in qunit since the collapsible never fires shown or hidden in quint.

@fat
Copy link
Member

fat commented Jun 20, 2012

Can you reopen with a demonstrable test case in either jsbin or qunit. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants