-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
NgbDatepicker popup in shadow dom closes itself when clicking on it #3965
Comments
We'll need a minimal reproduction scenario: StackBlitz or maybe a GitHub project in this case might be simpler. Otherwise not much we can do. Autoclose implementaion we have is here → https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/util/autoclose.ts Please take a look at the Getting Help section in documentation and use the appropriate support channel. If you believe you've found a bug in this library then please:
|
Thanks for answering. I forked your example on Stackblitz: Your Example: https://stackblitz.com/run?file=app/datepicker-popup.ts |
Would like this to be fixed soon, facing the same issue. |
We are also not able to use the Datepicker due to this issue. |
Do you have some updates to this issue? We plan using this component for long time inside of web-components. |
i am also facing same issue when i enable shadowdom it just get closed on every click no matter where you click , without shadowdom it is working fine but not with shadowdom |
The Problem is, that ng-bootstrap has an In ShadowDOM this Workaround Set |
I was able to overcome the issue by changing |
Any updates on this? |
Hey, I'm using your datepicker component in a shadow dom and when I open the popup and click inside of it, for example to change the year, the popup closes itself. I don't really know how you detect if the click was made inside the popup, but I made a breakpoint and saw that when you use something like document.elementsFromPoint(event.clientX, event.clientY), it will return only elements before the shadow-root, where the component is inside:
The text was updated successfully, but these errors were encountered: