Closed guillemcordoba closed 1 year ago
@guillemcordoba Thank you very much for finding the issue and providing the solution. I will apply it in the next release.
This is now implemented in v1.4.0. Please check.
It works! It's a joy working with open-source libraries that have cool maintainers that respond quickly. Props and many thanks!
The selectable property in the interaction plugin doesn't work if the calendar is rendered inside a shadow root (e.g. inside of a lit element).
This is because the
getElementWithPayload
function here assumes thatdocument.elementsFromPoint(x,y)
will return the elements of the event calendar, but if they are inside a shadow root what's returned is the custom element that contains the shadow root.I've been able to fix it by replacing that function's implementation with this implementation:
Which recursively pierces through all shadow roots that it finds.
Thanks for this amazing library!