Open infuzu-yidisprei opened 1 year ago
There is an open pull request for this issue https://github.com/bigskysoftware/htmx/pull/1456.
At the moment you have to use return false
instead of evt.preventDefault()
.
thank you so much. returning false does work for now
I have the following extension that I have been working on:
I know there is duplicate code for evt.preventDefault. I put both in so you get the idea. you can comment one out to see that they don't both work. I am aware that both can't exist at the same time in the code because the beforeRequest only triggers one of them. But when you take out the htmx.on code and only leave the extension code in, the console will print "printing two" but the evt.preventDefault() won't do anything. When you comment out that section in the extension and only run the htmx.on code, it does what it's supposed to and stops the request from going out. Any idea why this is happening?