You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]在webComponent自定义元素a的shadow dom里面使用TimePicker组件,把这个自定义元素a放到另外一个webComponent自定元素b的shadow dom中,TimePicker组件无法选中时间,第二次点击时间,会自动关闭时间选择框。排除后发现是依赖的这个项目的问题[/-][+]generateTrigger在多层shadow元素中使用的异常[/+]on May 18, 2024
popupEle?.contains(composedPathTargetList?.[0] as Node)
The inPopupOrChild must also check if there is a composed path in the event and check if the composedTarget (the actual clicked element inside the child shadow) is clicked.
constinPopupOrChild=useEvent((ele: any,composedPathTargetList: EventTarget[])=>{//ele in my webcomponent shadowDom case is the re-targeted webcomponent element//composedPathTargetList?.[0] is the actual element the user clickedconstchildDOM=targetEle;return(
...
popupEle?.contains(composedPathTargetList?.[0]asNode));},);
The e.composedPathTargetList is taken from the implementation in #463 PR useWinClick.ts
I did not want to make a PR here as i think this probably needs some testing and someone with a better overview, but rather use the examples as a mean to find the problem in combination with @gdutzhendong ´s PR
Activity
gdutzhendong commentedon May 17, 2024
pr: #462
[-]在webComponent自定义元素a的shadow dom里面使用TimePicker组件,把这个自定义元素a放到另外一个webComponent自定元素b的shadow dom中,TimePicker组件无法选中时间,第二次点击时间,会自动关闭时间选择框。排除后发现是依赖的这个项目的问题[/-][+]generateTrigger在多层shadow元素中使用的异常[/+]Psvensso commentedon Jul 5, 2024
This is blocking us very hard as well. This is not only Datepicker but all Dropdowns popovers etc.
Second click closes the portal.
@zombieJ You attention is needed plz
Psvensso commentedon Jul 8, 2024
popupEle?.contains(composedPathTargetList?.[0] as Node)
The inPopupOrChild must also check if there is a composed path in the event and check if the composedTarget (the actual clicked element inside the child shadow) is clicked.
The e.composedPathTargetList is taken from the implementation in #463 PR useWinClick.ts
I did not want to make a PR here as i think this probably needs some testing and someone with a better overview, but rather use the examples as a mean to find the problem in combination with @gdutzhendong ´s PR
afc163 commentedon Sep 3, 2024
Fixed in #471