Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/EditorCanvas/Note.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default memo(function Note({ data, onPointerDown }) {
if (newHeight === data.height) return;

updateNote(data.id, { height: newHeight });
}, [data.id, data.width, data.height, updateNote]);
}, [data.id, data.width, data.height, data.content, updateNote]);

return (
<g
Expand Down
6 changes: 1 addition & 5 deletions src/components/EditorSidePanel/NotesTab/NoteInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,7 @@ export default function NoteInfo({ data, nid }) {
autosize
readonly={layout.readOnly}
onChange={(value) => {
const textarea = document.getElementById(`note_${data.id}`);
textarea.style.height = "0";
textarea.style.height = textarea.scrollHeight + "px";
const newHeight = textarea.scrollHeight + 16 + 20 + 4;
updateNote(data.id, { height: newHeight, content: value });
updateNote(data.id, { content: value });
}}
onFocus={(e) =>
setEditField({ content: e.target.value, height: data.height })
Expand Down
Loading