wakirin / Litepicker

Date range picker - lightweight, no dependencies
MIT License
899 stars 132 forks source link

Shadow root support #250

Closed rikgirbes closed 3 years ago

rikgirbes commented 3 years ago

The onclick event is listened to on "document", when the datepicker is added to a shadowDOM element though, the event target would be the shadowDOM and not the datepicker.

By checking for shadowRoot and using composedPath(), everything works as expected.

eshlox commented 3 years ago

I can confirm that this works for me and fixes my issue with web components: https://github.com/wakirin/Litepicker/issues/252 💪

@wakirin Is there any chance to merge this fix and release it soon?

Remownz commented 3 years ago

+1

goaround commented 3 years ago

@wakirin would be great if this could be merged!