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.