MCPcopy Create free account
hub / github.com/dailydotdev/apps / startsInContent

Function startsInContent

packages/shared/src/components/shell/sheetDrag.ts:104–116  ·  view source on GitHub ↗
(target: EventTarget | null)

Source from the content-addressed store, hash-verified

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 (

Callers 1

onTouchStartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected