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
  • #33044
Closed
Open
Issue created Feb 10, 2021 by Administrator@rootContributor

Forms inside dropdown prevent click propagation

Created by: tmont

If you have a <form> inside a .dropdown, all click events in the form are prevented from propagating. This is broken in Bootstrap 5, while events used to propagate properly in Bootstrap 4.

Tested on Firefox/Chromium on Linux.

  • Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
  • Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Markup was taken directly from the docs.


Bootstrap 4.6 (should alert when you click on the email input):

https://jsbin.com/wilobevopo/1/edit?html,output

Bootstrap 5 beta2 (does not alert):

https://jsbin.com/qoxojeloni/1/edit?html,output


Seems to stem from this very deliberate line: https://github.com/twbs/bootstrap/blob/e50c11b8c6434b6d68ea5897771e4d35fe12f5c3/js/src/dropdown.js#L527

There are some other issues related to event propagation in dropdowns, but they are years old and obviously don't apply to the v5 betas.

Assignee
Assign to
Time tracking