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
  • Issues
  • #30267
Closed
Open
Issue created Feb 22, 2020 by Administrator@rootContributor

Dropdown data-toggle="dropdown" element click events not bubble

Created by: njake

_addEventListeners function has two functions to prevent default link actions. event.preventDefault() event.stopPropagation()

If link element is not used for toggle, disabling events are not nesessary at all?

Reason is i need attach events to all toggle elements to get click events wanted from toggle elements. Better way is to attach single event listener to parent and use event.target, this is not working now.

Is it possible to add check if toggle element is link, then add those events something like: if(this._element.nodeName == 'a'){ event.preventDefault(); event.stopPropagation(); } or using data attribute to disable/enable bubling.

Assignee
Assign to
Time tracking