You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that if you click fast enough (within the 350 millisecond transition window) you can open two panels at once. I did this accidentally, not trying to troll my own application. The issue was previously resolved via #2941 and works well in 2.3.2, but was re-broken in 3.0 because the .in class is not added until the transition completes (as opposed to 2.3.2 where it's added immediately). You can observe the behavior on Bootstrap's document site. Expand the third pane then click panes 2 & 1 quickly. Panes 1 & 2 will open.
The straight-forward fix is pretty simple, I think. Instead of only checking for the .in class for "actives", check for .in and .collapsing, e.g.
However, if that's the only change made, the "show" event is still triggered for the element, even though it's not going to continue to the end. So anything listening for the "show" event (e.g. something to toggle an icon or background color) will fire erroneously. Commit 13cad50 made the event trigger before both this check and the isDefaultPrevented check, so I'm guessing the author had a reason, but I don't know what it is, so don't want to submit a pull request.
I'm using Chrome 38 on Mac OS Yosemite to test this. Let me know what other information might be useful.
The text was updated successfully, but these errors were encountered:
Sorry, I did search, which is how I found the ticket that I referenced. I saw no open tickets on the issue, otherwise I would not have wasted my time researching and filling out this issue.
However, I don't see what in that ticket would deal with the "show" event getting triggered even though the panel won't be shown. I can't be the only person who listens for that event in order to change a style or perform some other action.
hnrch02
changed the title
Multiple panels open in the Accordion
Collapse: show event fires even though show is prevented because other element is transitioning
Oct 22, 2014
I just noticed that if you click fast enough (within the 350 millisecond transition window) you can open two panels at once. I did this accidentally, not trying to troll my own application. The issue was previously resolved via #2941 and works well in 2.3.2, but was re-broken in 3.0 because the
.in
class is not added until the transition completes (as opposed to 2.3.2 where it's added immediately). You can observe the behavior on Bootstrap's document site. Expand the third pane then click panes 2 & 1 quickly. Panes 1 & 2 will open.The straight-forward fix is pretty simple, I think. Instead of only checking for the
.in
class for "actives", check for.in
and.collapsing
, e.g.However, if that's the only change made, the "show" event is still triggered for the element, even though it's not going to continue to the end. So anything listening for the "show" event (e.g. something to toggle an icon or background color) will fire erroneously. Commit 13cad50 made the event trigger before both this check and the
isDefaultPrevented
check, so I'm guessing the author had a reason, but I don't know what it is, so don't want to submit a pull request.I'm using Chrome 38 on Mac OS Yosemite to test this. Let me know what other information might be useful.
The text was updated successfully, but these errors were encountered: