Skip to content
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

prependQueue style 样式丢失 #119

Open
yaxiaoliu opened this issue Jun 30, 2023 · 5 comments
Open

prependQueue style 样式丢失 #119

yaxiaoliu opened this issue Jun 30, 2023 · 5 comments

Comments

@yaxiaoliu
Copy link

我的 chrome 插件(用的 plasmo 框架)有两个 shadowDom 的 content_script 注入,其中随机的出现部分 antd 样式丢失,比如 ant-tooltip

image 发现所在的 shadowRoot 中相关的 style 标签为空了 image

而同一个页面另外个 shadowRoot 正常:
image
对应的 style 标签内容正常:
image

两个 shadowRoot 的 StyleProvider 写法也没区别:

<StyleProvider container={document.getElementById(SEARCH_ENHANCE_ID).shadowRoot}>

<StyleProvider container={document.getElementById(HOST_ID).shadowRoot}>

依赖版本:
"@ant-design/cssinjs": "^1.10.1",
"antd": "^5.6.3",

@WE1ZHANTA0
Copy link

我也出现了这个问题,部分组件的样式丢失,请问你解决了吗

@mb8z
Copy link

mb8z commented Aug 13, 2023

Having the same issue. Works fine for most element, but e.g. ant-message components are getting injected into the head, instead of the shadowRoot passed to the container

@infodusha
Copy link

I have the same issue with Tag component

@afc163
Copy link
Member

afc163 commented Nov 20, 2023

Trace ant-design/ant-design#45894

cc @zombieJ

@GisonL
Copy link

GisonL commented Feb 6, 2024

我也是在开发Chrome插件时使用shadowDom,其他组件能正确插入到指定节点,只有message的样式被插入到了body-head中

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants