Fix "dirty" trigger on notes

This commit is contained in:
Oliver Walters 2026-05-27 05:28:22 +00:00
parent 09ab37578e
commit 8d4c201cb4
1 changed files with 3 additions and 2 deletions

View File

@ -254,9 +254,10 @@ export default function NotesEditor({
selector: ({ editor: e }) => e?.isActive('table') ?? false
});
// Sync editor editable state when permissions change
// Sync editor editable state when permissions change.
// Pass false for emitUpdate to avoid triggering onUpdate (which sets isDirty).
useEffect(() => {
editor?.setEditable(canEdit && isEditing);
editor?.setEditable(canEdit && isEditing, false);
}, [editor, canEdit, isEditing]);
const hasNotes = useMemo(() => {