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

Click close #12

Closed
sanyashvets opened this issue Mar 22, 2017 · 4 comments
Closed

Click close #12

sanyashvets opened this issue Mar 22, 2017 · 4 comments

Comments

@sanyashvets
Copy link

sanyashvets commented Mar 22, 2017

I have a modal with v-click-away directive installed on it with modalClose event. And also I have dropdown's <li>, buttons with (v-if, v-show in modal) and @click events on it. I have no idea why, but modal fires it modalClose event by click on li and buttons. Yes, I can use @mouseup or @mousedown events instead of @click, but I think I have to tell u about this issue

P.S. thx for plugin. It's great!

@simplesmiler
Copy link
Owner

Hi! Thanks for the report and sorry for taking some time to answer.

Like with #9, most likely your dropdown content is attached outside of the model container (e. g. attached to <body>). Can you provide a demo?

If that is the case, then the solution is to manually check in the away handler whether the event originated from the dropdown content.

@sanyashvets
Copy link
Author

click-away fires, if dropdown installed with v-if directive. In all cases. All troubles like this happens only with v-if

@ExileLee
Copy link

@sanyashvets
have same issue..

I found a simple solution
just set @click.stop

@simplesmiler
Copy link
Owner

Looking at this with a fresh eye, this should have already been fixed in 2.1.
Also, Vue 2.5 slightly changed it's internals in a way that also should fix this issue.

You may only be affected by this if you are using Vue < 2.5 and VueClickaway < 2.1. Try updating, and if you are still being affected by this, please open a new issue with a repro.

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

3 participants