MCPcopy Create free account
hub / github.com/react-dropzone/react-dropzone / onDocumentDrop

Function onDocumentDrop

src/index.js:519–526  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

517 const dragTargetsRef = useRef([]);
518 const globalDragTargetsRef = useRef([]);
519 const onDocumentDrop = (event) => {
520 if (rootRef.current && rootRef.current.contains(event.target)) {
521 // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler
522 return;
523 }
524 event.preventDefault();
525 dragTargetsRef.current = [];
526 };
527
528 useEffect(() => {
529 if (preventDropOnDocument) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…