From 55ac1d3961e8ba1bbfc93e5071b324770b93c4ea Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Fri, 12 Jul 2024 13:17:52 -0400 Subject: [PATCH] address "Dates not selectable in Shadow DOM #7685" --- .../interaction/src/interactions/HitDragging.ts | 2 +- standard/tests/manual/web-component.html | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/standard/packages/interaction/src/interactions/HitDragging.ts b/standard/packages/interaction/src/interactions/HitDragging.ts index 063eb2194..67fe0576d 100644 --- a/standard/packages/interaction/src/interactions/HitDragging.ts +++ b/standard/packages/interaction/src/interactions/HitDragging.ts @@ -193,7 +193,7 @@ export class HitDragging { ( this.disablePointCheck || offsetTracker.el.contains( - document.elementFromPoint( + (offsetTracker.el.getRootNode() as unknown as DocumentOrShadowRoot).elementFromPoint( // add-back origins to get coordinate relative to top-left of window viewport positionLeft + originLeft - window.scrollX, positionTop + originTop - window.scrollY, diff --git a/standard/tests/manual/web-component.html b/standard/tests/manual/web-component.html index 2655c0569..7d6a4d1f3 100644 --- a/standard/tests/manual/web-component.html +++ b/standard/tests/manual/web-component.html @@ -24,6 +24,21 @@ } +