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.
2 parents f57f260 + dfe424b commit 42e0839Copy full SHA for 42e0839
β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