Skip to content

Commit 9ee83f1

Browse files
committed
Fix IME composition handling for option inputs
Signed-off-by: don9x2E <revan@kakao.com>
1 parent 2e132be commit 9ee83f1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/Questions/AnswerInput.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@input="debounceOnInput"
2323
@keydown.delete="deleteEntry"
2424
@keydown.enter.prevent="focusNextInput"
25-
@compositionstart="onCompositionEnd"
25+
@compositionstart="onCompositionStart"
2626
@compositionend="onCompositionEnd" />
2727

2828
<!-- Actions for reordering and deleting the option -->
@@ -295,7 +295,10 @@ export default {
295295
/**
296296
* Request a new answer
297297
*/
298-
focusNextInput() {
298+
focusNextInput(e) {
299+
if (this.isIMEComposing || e?.isComposing) {
300+
return
301+
}
299302
if (this.index <= this.maxIndex) {
300303
this.$emit('focus-next', this.index, this.optionType)
301304
}
@@ -308,6 +311,10 @@ export default {
308311
* @param {Event} e the event
309312
*/
310313
async deleteEntry(e) {
314+
if (this.isIMEComposing || e?.isComposing) {
315+
return
316+
}
317+
311318
if (this.answer.local) {
312319
return
313320
}

0 commit comments

Comments
 (0)