Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !6692

Do not toggle collapsed state on collapse clicked element if target is still animating

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/fwielstra/master into master 12 years ago
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: fwielstra

Fix for issue #6691 (closed)

Not sure if the check for the target's height is "proper", but since for every collapse event, a new Collapse is created with its own (unshared) 'transitioning' state, which the click target doesn't have access to, this was the only thing I could think of for now.

Compare
  • master (base)

and
  • latest version
    bd51b24a
    2 commits, 2 years ago

1 file
+ 4
- 2

    Preferences

    File browser
    Compare changes
js/bootstrap-collapse.js
+ 4
- 2
  • View file @ bd51b24a


@@ -97,6 +97,7 @@
, complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.removeClass('transitioning');
that.$element.trigger(completeEvent)
}
@@ -105,6 +106,7 @@
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element.addClass('transitioning');
this.$element[method]('in')
@@ -160,8 +162,8 @@
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
if (!$(target).hasClass('transitioning')) $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);
\ No newline at end of file
}(window.jQuery);
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
js
1
js
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: twbs/bootstrap!6692
Source branch: github/fork/fwielstra/master

Menu

Explore Projects Groups Snippets