cssinjs icon indicating copy to clipboard operation
cssinjs copied to clipboard

prependQueue style 样式丢失

Open yaxiaoliu opened this issue 2 years ago • 6 comments
trafficstars

我的 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",

yaxiaoliu avatar Jun 30 '23 08:06 yaxiaoliu

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

WE1ZHANTA0 avatar Jul 30 '23 04:07 WE1ZHANTA0

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

mb8z avatar Aug 13 '23 11:08 mb8z

I have the same issue with Tag component

infodusha avatar Nov 17 '23 19:11 infodusha

Trace https://github.com/ant-design/ant-design/issues/45894

cc @zombieJ

afc163 avatar Nov 20 '23 02:11 afc163

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

GisonL avatar Feb 06 '24 05:02 GisonL