form-request-submit-polyfill
form-request-submit-polyfill copied to clipboard
stop propagation on click event
we ran in an issue where we use requestSubmit on a form that we're showing in a modal
Using a click event listener and checking if the click was outside of the modal (using modal.contains(clickedTarget)
) to close the modal. (using stimulus useClickOutside)
I found that adding stopPropagation()
to a submitter click event fixed the issue for us, but not sure whether this would potentially break things elsewhere