Browse Source

avoid updating input value during IME composition (fix #3894)

dev
Evan You 8 years ago
parent
commit
5b4b9269a5
  1. 2
      src/platforms/web/runtime/modules/dom-props.js

2
src/platforms/web/runtime/modules/dom-props.js

@ -34,7 +34,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
elm._value = cur
// avoid resetting cursor position when value is the same
const strCur = cur == null ? '' : String(cur)
if (elm.value !== strCur) {
if (elm.value !== strCur && !elm.composing) {
elm.value = strCur
}
} else {

Loading…
Cancel
Save