Skip to content

Commit f70f7a1

Browse files
remove debounce from rich text editor onChange event to avoid cursor jumping
1 parent a4b0fae commit f70f7a1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

client/packages/lowcoder/src/comps/comps/richTextEditorComp.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,7 @@ function RichTextEditor(props: IProps) {
205205
originOnChangeRef.current = props.onChange;
206206

207207
const onChangeRef = useRef(
208-
debounce > 0
209-
? _.debounce((v: string) => {
210-
window.clearTimeout(isTypingRef.current);
211-
isTypingRef.current = window.setTimeout(() => (isTypingRef.current = 0), 100);
212-
originOnChangeRef.current?.(v);
213-
})
214-
: (v: string) => originOnChangeRef.current?.(v)
208+
(v: string) => originOnChangeRef.current?.(v)
215209
);
216210

217211
// react-quill will not take effect after the placeholder is updated

0 commit comments

Comments
 (0)