-
Notifications
You must be signed in to change notification settings - Fork 18
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
ShadowDOM Support Broken #41
Comments
Hi, This change was made because MCDatepicker uses one calendar node for all calendar instances. Before this commit, the calendar node was added only to the context of the first instance. For example: if you have 2 instances, the first one using document.body as context and the second one shadow root, |
I see. In order to fully support shadow dom the element would need to be inserted there. Perhaps the package can be modified so that a date picker is inserted into each context? That way you maintain support for multiple pickers while also supporting shadow dom. |
Yes, I think it's a good idea! |
Hi @mikecoj any update about this shadow dom support? |
Hi there, Due to my involvement in other big projects, I had to dedicate more time to them and less time to this one. I hope this will change soon. If you've found the solution, I'll be happy to receive a PR from you. Thank you! |
In the commit "fixed default context option" (493bf00) the changes made broke shadow dom support. We're currently using this date picker in the shadow dom and the picker is now added to the global document of the page instead of the shadow dom.
The following change in
src/js/render.js
is the root of the issue.This change was originally intended to allow the date picker to be added to any element rather than only the document root. This would allow the picker to be used in shadow dom as well as inside iframes and other areas that aren't in the global document.
Is there a way this functionality can be reinstated?
The text was updated successfully, but these errors were encountered: