We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6167676 commit cad806bCopy full SHA for cad806b
1 file changed
src/core/pan/panning.utils.ts
@@ -16,7 +16,17 @@ export const isPanningStartAllowed = (
16
const { isInitialized, wrapperComponent } = contextInstance;
17
18
const target = event.target as HTMLElement;
19
- const isWrapperChild = wrapperComponent?.contains(target);
+ const targetIsShadowDom = "shadowRoot" in target && "composedPath" in event;
20
+ const isWrapperChild = targetIsShadowDom
21
+ ? event.composedPath().some((el) => {
22
+ if (!(el instanceof Element)) {
23
+ return false;
24
+ }
25
+
26
+ return wrapperComponent?.contains(el);
27
+ })
28
+ : wrapperComponent?.contains(target);
29
30
const isAllowed = isInitialized && target && isWrapperChild;
31
32
if (!isAllowed) return false;
0 commit comments