chore(eslint): add warning when using async preventDefault() #7723
chore(eslint): add warning when using async preventDefault() #7723wmertens merged 3 commits intoQwikDev:mainfrom
Conversation
|
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
maiieul
left a comment
There was a problem hiding this comment.
Really good idea 🔥 Thanks a lot @Shane-Donlon!
wmertens
left a comment
There was a problem hiding this comment.
Looking good, but you also need to do stoppropagation
|
What's missing here? |
|
Remaining to-do:
I was away last week and forgot to acknowledge the review, but should be able to get around to it this week.
|
gioboa
left a comment
There was a problem hiding this comment.
Thanks @Shane-Donlon for your help.
is this PR still valid?
|
thansk @Shane-Donlon ! |

What is it?
See also [🐞] onSubmit$ form handler not preventing default #7718
Description
Hey guys,
Feedback welcome - but thought I'd propose this as an idea.
While the knowledge exists in the documentation, the goal here is to prompt Developers that this is not a bug and to search the docs or to ask within Discord.
This does exclude
sync$((e)=>{e.preventDefault()}functions, and I did add this as a warning over error just in case there was something else I wasn't considering, and wouldn't result in breaking any builds.Checklist