fix: prevent stream click navigation during text edit
This commit is contained in:
@@ -51,7 +51,10 @@ export function TextEditOverlay({
|
|||||||
}, [saving, textContent, particle.properties.content, particle.id, streamPath, onClose]);
|
}, [saving, textContent, particle.properties.content, particle.id, streamPath, onClose]);
|
||||||
|
|
||||||
return createPortal(
|
return createPortal(
|
||||||
<div className="fixed inset-0 z-[100]">
|
// React synthetic events bubble through the React tree (not the DOM tree),
|
||||||
|
// so clicks here would reach stream-view's click-to-navigate handler even
|
||||||
|
// though we're portaled to document.body. Stop propagation at the root.
|
||||||
|
<div className="fixed inset-0 z-[100]" onClick={(e) => e.stopPropagation()}>
|
||||||
<TextEditor
|
<TextEditor
|
||||||
textContent={textContent}
|
textContent={textContent}
|
||||||
onTextChange={setTextContent}
|
onTextChange={setTextContent}
|
||||||
|
|||||||
Reference in New Issue
Block a user