Skip to content

Commit d352510

Browse files
committed
fix : 회의록 텍스트 수정 중 커서가 뒤로 밀리는 문제 해결
1 parent 7271b72 commit d352510

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/src/components/Minutes/Tiptap/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ export default function Tiptap() {
4949
handleSocketEvent({
5050
actionType: "updateContent",
5151
payload: { content: editor.getHTML() },
52-
callback: () => {
53-
updateContent(editor.getHTML());
54-
},
5552
}),
5653
1500,
5754
);

client/src/store/NodeListProvider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default function NodeListProvider({ children }: { children: ReactNode })
5555
const stage = useRef<Konva.Stage>();
5656
const socket = useConnectionStore((state) => state.socket);
5757
const handleSocketEvent = useConnectionStore((state) => state.handleSocketEvent);
58+
const currentRole = useConnectionStore((state) => state.currentRole);
5859

5960
useEffect(() => {
6061
if (!socket) return;
@@ -97,7 +98,9 @@ export default function NodeListProvider({ children }: { children: ReactNode })
9798
updateTitle(updatedTitle.title);
9899
},
99100
updateContent: (updatedContent) => {
100-
updateContent(updatedContent.content);
101+
if (currentRole === "editor") {
102+
updateContent(updatedContent.content);
103+
}
101104
},
102105
};
103106

0 commit comments

Comments
 (0)