Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !3616

Prevent collapse from getting stuck in transition state by calling show/hide when already shown/hidden

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/kmiyashiro/master into master May 27, 2012
  • Overview 0
  • Commits 8
  • Pipelines 0
  • Changes 1

Created by: kmiyashiro

If you call collapse('hide') on a collapsable element that is already hidden, the transitioned event will never fire and therefore the complete callback will never run. That means the element's transitioning property will always equal 1 and it will be unresponsive to future collapse() calls.

This pull request adds a check for the in class to determine whether or not to show/hide an already shown/hidden element. This is potentially a breaking change if people rely on "shown" events for elements that are already shown... but this would be more consistent with the tab behavior where you can't show an already shown tab. Would be nice if we can add the state to the data so we don't have to check on the class.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/kmiyashiro/master