Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot register "capture" phase event handlers #714

Open
davidAtInleague opened this issue Jun 18, 2024 · 1 comment
Open

Cannot register "capture" phase event handlers #714

davidAtInleague opened this issue Jun 18, 2024 · 1 comment

Comments

@davidAtInleague
Copy link

🐛 Bug description

Event handlers using onXXX={withModifiers(..., ["capture"])} are not registered in "capture" mode.

📝 Steps to reproduce

Attempt to register an event handler using the readme's suggested syntax of withModifiers

Reproduction Link (required):
https://stackblitz.com/edit/vitejs-vite-c3hwy2?file=src%2FApp.vue,index.html

🏞 Desired result

Event handlers can be registered in capture mode.

🚑 Other information

#533

@davidAtInleague
Copy link
Author

davidAtInleague commented Jun 18, 2024

onClickCapture works but there's not a declared type for it, so TSC kicks it out. This leaves us with the workaround

<div {...{onClickCapture: evt => {}}}>...</div>

Maybe types can be added for *Capture suffixed events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant