We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d554c6 commit dfe424bCopy full SHA for dfe424b
client/src/components/Mom/Block/TextBlock.tsx
@@ -127,10 +127,22 @@ function TextBlock({
127
};
128
}, []);
129
130
+ useEffect(() => {
131
+ updateCaretPosition();
132
+ }, [isOpen]);
133
+
134
// 로컬에서 일어나는 작성 - 삽입과 삭제 연산
135
const onInput: React.FormEventHandler = (e) => {
136
setOffset();
137
138
+ if (!blockRef.current) return;
139
140
+ if (blockRef.current.innerText === '/') {
141
+ setIsOpen(true);
142
+ } else if (isOpen) {
143
+ setIsOpen(false);
144
+ }
145
146
if (offsetRef.current === null) return;
147
148
const event = e.nativeEvent as InputEvent;
0 commit comments