-
Notifications
You must be signed in to change notification settings - Fork 87
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
Prevent default click on outside elements #93
Comments
Hi @pachiraDIG this library supports a middleware, the middleware function receives the event as an argument, you can call Let me know if this works for you 👍 |
Hmm... seems as though I can't get the middleware to work. Even the console logs aren't firing. Although, everything is matching up with the codesandbox demo. Using nuxt, so I created a plugin -- which is working because I'm not directly importing the library in the component itself. Any suggestions? |
@pachiraDIG take a look at this article maybe we can catch the event at the capturing phase before its bubbling phase. |
In case anyone else stumbles upon this answer looking for how to prevent default click, there is another wrinkle that tripped me up for a few minutes. This library binds |
Hi there,
I'd love to see this implemented as a feature, if possible. : )
I'm currently using v-click-outside for closing opened dropdowns and popups, but I'd like to prevent the default click on any element in the page that gets clicked while using it this way.
Any suggestions would be great too.
Thanks!
The text was updated successfully, but these errors were encountered: