(target: EventTarget | null)
| 102 | |
| 103 | // A finger on a field, or inside a list that is scrolled, is not a drag. |
| 104 | const startsInContent = (target: EventTarget | null): boolean => { |
| 105 | let node = target as HTMLElement | null; |
| 106 | while (node && node !== panel) { |
| 107 | if (node.matches?.('input, textarea, select, [contenteditable="true"]')) { |
| 108 | return true; |
| 109 | } |
| 110 | if (node.scrollTop > 0) { |
| 111 | return true; |
| 112 | } |
| 113 | node = node.parentElement; |
| 114 | } |
| 115 | return false; |
| 116 | }; |
| 117 | |
| 118 | const onTouchStart = (event: TouchEvent) => { |
| 119 | if ( |