style-switcher icon indicating copy to clipboard operation
style-switcher copied to clipboard

Fix closeModal invoked right after openModal when used in stencilJS Web Component with Maplibre

Open lbrutti opened this issue 2 years ago • 3 comments

see issue #21

lbrutti avatar Apr 12 '22 11:04 lbrutti

Hi, Thanks for taking the time to create a pr, however, this would mean a difference in functionality. we don't want to only listen the container. Maybe it can be a fallback instead?

el avatar Apr 13 '22 10:04 el

hello :) thanks for the replies.

I added an optional flag in the constructor to bind the click event to the mapContainer if is set to true. do you think this could be a good approach?

Thanks!!!

lbrutti avatar Apr 13 '22 12:04 lbrutti

I think a better approach would be to detect if the code is running inside a shadow root or not and bind accordingly. Sorry, it took a while for me to respond, I had covid last week.

el avatar Apr 25 '22 10:04 el