IME composition
Vue
merged
naive-ui: Enter during IME composition adds a tag (Vue dynamic tags)
n-dynamic-tags commits a tag on the Enter that confirms an IME conversion
naive-ui · tusen-ai/naive-ui
Symptom
Pressing Enter to confirm a kana to kanji conversion in an n-dynamic-tags input creates a tag from the in-progress text instead of just finishing the conversion.
Minimal repro
1. Render <n-dynamic-tags> and focus its input. 2. Switch to a Japanese IME, type "とうきょう", press Space to convert to 東京. 3. Press Enter to pick the candidate. 4. A tag is added from the unconfirmed text before the conversion commits.
Fix
Skip tag creation while e.isComposing is true; only act on the Enter that fires after compositionend.