fix(v-model): avoid clearing IME compose state on updates (#2304)
fix #2302
This commit is contained in:
parent
4d1ebb5deb
commit
fbd198fbfe
@ -79,6 +79,8 @@ export const vModelText: ModelDirective<
|
||||
},
|
||||
beforeUpdate(el, { value, modifiers: { trim, number } }, vnode) {
|
||||
el._assign = getModelAssigner(vnode)
|
||||
// avoid clearing unresolved text. #2302
|
||||
if ((el as any).composing) return
|
||||
if (document.activeElement === el) {
|
||||
if (trim && el.value.trim() === value) {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user