-
-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
getEventListenerTarget
when target element is not an instance o…
…f `HTMLElement` (#335) For example, when the target element is an SVGElement, the event listener target returned was the owner document instead. This causes issues with touch events when the `target` is an SVGElement. If the `event.target` element is removed from the document events will still be targeted at it, and hence won't always bubble up to the window or document anymore. If there is any risk of an element being removed while it is being dragged, the best practice is to attach the event listeners directly to the target.
- Loading branch information
Showing
3 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@dnd-kit/core": patch | ||
--- | ||
|
||
Fix `getEventListenerTarget` when target element is not an instance of `HTMLElement` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters