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

html elems inside v-click-outside block also recognized as outside elems #175

Open
moneyinvest opened this issue Feb 28, 2020 · 7 comments

Comments

@moneyinvest
Copy link

No description provided.

@bpeab
Copy link

bpeab commented Apr 17, 2020

Also having this issue in one of our components which uses a default slot and a named slot. The issue appears only for focusable elements which are in the default slot. Focusable elements that are inside the named slot are not recognize as outside elements by v-click-outside.

@furkangkhsn
Copy link

Also having this issue in one of our components which uses a default slot and a named slot. The issue appears only for focusable elements which are in the default slot. Focusable elements that are inside the named slot are not recognize as outside elements by v-click-outside.

But why? I need an input inside a v-click-outside block. It's annoying behaviour.

@ndelvalle
Copy link
Owner

Would you guys mind investigate a bit more the issue, maybe creating something to reproduce it so it's easier to fix?
At the moment I have a lot on my plate, maybe I can take a look at it next week 🙁

@bpeab
Copy link

bpeab commented Apr 20, 2020

Of course, it's normal.

Unfortunatly, I can't share the project the issue is appearing on and I wasn't able to reproduce this issue in a blank project with the same components and dependencies. I'll try again later and come back if I found something.

@bpeab
Copy link

bpeab commented May 13, 2020

It was a misunderstanding.

I had a search with dropdown inside the container that had the v-click-outside directive set. The dropdown would have a variable number of elements inside of it and therefore, the container height was depending on the number of elements of the dropdown.

Clicking (mousedown) on a element of the dropdown would trigger an event and close the dropdown. By time mouseup would have been fired — which would have triggered v-click-outside — the container would have re-adjusted its height and the cursor would had endend up outside of the actual container...

It definitly not coming from v-click-outside. Sorry and thank you very much for this great library !

@ndelvalle
Copy link
Owner

@bpeab thanks for reporting back. @moneyinvest can you please provide an example that reproduces the bug?

@pepijninova
Copy link

pepijninova commented Aug 7, 2023

I know this issue is quite old, but it seems like form elements with the same name are not handled how you'd expect.

I had two forms: 1 outside a modal, 1 inside.
Changing the name of the elements in the modal (_modal as suffix for example) works for us.

My guess is that form elements are checked for uniqueness using name and not parent element or something similar. I haven't looked in the code yet.

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

No branches or pull requests

5 participants