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 elm._value = cur
// avoid resetting cursor position when value is the same // avoid resetting cursor position when value is the same
const strCur = cur == null ? '' : String(cur) const strCur = cur == null ? '' : String(cur)
if (elm.value !== strCur) { if (elm.value !== strCur && !elm.composing) {
elm.value = strCur elm.value = strCur
} }
} else { } else {

Loading…
Cancel
Save