-
Notifications
You must be signed in to change notification settings - Fork 143
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
ShadowRoot not expected #230
Comments
I Have the exact same problem using This is a problem for the
When using shadowDom, there is no |
Why is it closed? It is still the issue for me. |
I think this will be always an issue, nobody implements things to work across Shadow DOMs, in fact, the purpose of using Shadow DOM is to not mix codes (ref). |
@sconix are you saying that popover creation inside a shadow-dom is a bad idea? |
The thing is, the color picker is being loaded in the DOM that has the Shadow DOM inside it, the purpose of using Shadow DOM is to not have any code from outside running in it. If you create a workaround, you are actually creating a bypass to the Shadow DOM feature, a hole in the encapsulation. Conclusion: Yes, it's wrong to have a popover working inside a Shadow DOM. |
Ok, thank you for the explanation. |
Yes, exactly, everything you want to run inside the encapsulation should be loaded inside it, no matter if it's a style sheet or a script, but keep in mind, if you have hundreds of encapsulated components you will end up loading hundreds of times the same thing, breaking one of the advantages of using a single-page application framework like Angular. |
Even if this package will be loaded directly inside a shadow dom I don't see how the current code will work, the issue will remain the same. |
I didn't try to load it inside the Shadow DOM, if it's not working that way, so maybe it could have some space for improvements. I will reopen this issue so some code maintainer can see if something can be done. |
Description:
Every time I click to open the dialog an error occurs.
I don't really know how to reproduce, I think there is something to do with view encapsulation in my component, not sure.
Error:
Solution:
Just fixing the error line will stop the current exception, but there is a lot of other problems using ShadowRoot, the best thing I can think of is to treat the dialog as an inline absolute element and just change its visibility, as it will become part of the Shadow, the problem is gone.
Workaround:
If someone needs a quick solution to the specific error, here is, but i recomend changing the color picker to inline display
cpDialogDisplay="inline"
.Version:
I am using v8.2.0, I tried v9.1.0 and the problem persist, I am not using v9.1.0 because of another open issue.
The text was updated successfully, but these errors were encountered: