a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

only do selection management inside text blocks

+3 -3
+3 -3
components/SelectionManager.tsx
··· 493 493 if (!entity_set.permissions.write) return; 494 494 let mouseDownListener = (e: MouseEvent) => { 495 495 if ((e.target as Element).getAttribute("data-draggable")) return; 496 - setMouseDown(true); 497 496 let contentEditableParent = getContentEditableParent(e.target as Node); 498 497 if (contentEditableParent) { 498 + setMouseDown(true); 499 499 let entityID = (contentEditableParent as Element).getAttribute( 500 500 "data-entityid", 501 501 ); 502 502 useSelectingMouse.setState({ start: entityID }); 503 + initialContentEditableParent.current = contentEditableParent; 503 504 } 504 - initialContentEditableParent.current = contentEditableParent; 505 505 }; 506 506 let mouseUpListener = (e: MouseEvent) => { 507 507 savedSelection.current = null; ··· 541 541 return; 542 542 } 543 543 if (!savedSelection.current) savedSelection.current = saveSelection(); 544 + window.getSelection()?.removeAllRanges(); 544 545 } 545 - window.getSelection()?.removeAllRanges(); 546 546 }; 547 547 window.addEventListener("mousemove", mouseMoveListener); 548 548 return () => {