Skip to content

Double-clicking collapse trigger element causes invalid 'collapsed' class on it #6691

@fwielstra

Description

@fwielstra

fiddle: http://jsfiddle.net/R54gD/4/

I've made the fiddle so that the clickable target is highlighted a bright red when it has the class "collapsed". Normally, it will be red when collapsed, white when expanded. Double-clicking it from the 'collapsed' state, however, will cause the 'collapsed' class to be applied, even though the animation is still going, and it remains as such while the animation persists.

The issue lies in bootstrap-collapse.js, the collapse data-api does not check if the animation is currently running on the target or not, it just checks the current status of 'this', which toggles regardless of the state of the collapsing element. I'll see if I can provide a fix.

This issue seems to persist in all browsers. It's an issue for us because we show a rotating arrow in the clickable element depending on its current collapsed state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions