Skip to content

Commit 7311bf3

Browse files
committed
perf(code-viewer): ignore doc change events during IME composition
1 parent 8f92af2 commit 7311bf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/CodeViewer/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const initEditor = () => {
167167
? [{ javascript, json, yaml }[props.lang]()]
168168
: []),
169169
EditorView.updateListener.of((update) => {
170-
if (update.docChanged) {
170+
if (update.docChanged && !update.view.composing) {
171171
onChange(update.state.doc.toString())
172172
}
173173
}),

0 commit comments

Comments
 (0)