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

Problem with clickOutsideAction in webcomponent setup #170

Open
nosovk opened this issue Jul 8, 2023 · 5 comments
Open

Problem with clickOutsideAction in webcomponent setup #170

nosovk opened this issue Jul 8, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@nosovk
Copy link

nosovk commented Jul 8, 2023

I'm trying to create webcomponent that will wrap sveltecomponent to use it in html templates.
Here is a repro: https://github.com/nosovk/KBC-webcomponents here is testing page: https://kbc-webcomponents.vercel.app/lib/

Integration seems to be easy, except one problem.
image
It seems that clickOutsideAction blocks another handler from firing (handleSelect(country.iso2, e);). If I remove clickOutsideAction click handler works as expected.

Could you please modify clickOutsideAction to not prevent other events in a flow?

@nosovk
Copy link
Author

nosovk commented Jul 8, 2023

@gyurielf
Copy link
Owner

I'll adjust it. I make the prevent checking optional.

Otherwise, it's just a utility fn, not necessary to use or you can use your ow implementation.
The main purpose was provide all of the utilities which needs to make a proper phone input.

@nosovk
Copy link
Author

nosovk commented Jul 16, 2023

hm, I found that I can create my own function, but it seems that any capture: true brokes clicks on language items

@gyurielf gyurielf added the bug Something isn't working label Jul 23, 2023
@gyurielf
Copy link
Owner

gyurielf commented Aug 10, 2023

I walked around the issue, if I uncheck Ancestors, just the button event listeners remains.
Did you manage to fix this or need some help ?

@nosovk
Copy link
Author

nosovk commented Aug 10, 2023

Nope, wasn't able to fix. I think that problem could be in custom element's wrapper, but wasn't able to confirm the actual reason of bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants