form-request-submit-polyfill icon indicating copy to clipboard operation
form-request-submit-polyfill copied to clipboard

stop propagation on click event

Open riencoertjens opened this issue 3 years ago • 0 comments

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

riencoertjens avatar Nov 16 '21 08:11 riencoertjens