Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

fix: compatible with shadowNode on touch event

Open lqs469 opened this issue 3 years ago • 1 comments

Compatible with the shadowDOM when users trigger touch events.

Previously it uses .parentNode to get the parent node, but if it's a shadowNode, it could get a null. So add the .getRootNode().host to get shadowDOM root node when got null.

Here is a repro sandbox: https://stackblitz.com/edit/typescript-tuvyqs?file=mySortable.js You can confirm it by removing the addition code in line 1953.

lqs469 avatar Mar 29 '22 07:03 lqs469

@owen-m1 wanted to bring awareness of this PR to you (no rush) - curious if you'd be open to this contribution to better support certain web component scenarios. Thanks!

chrisdholt avatar Apr 15 '22 16:04 chrisdholt