File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/platforms/web/runtime/modules Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
41
41
elm . _value = cur
42
42
// avoid resetting cursor position when value is the same
43
43
const strCur = isUndef ( cur ) ? '' : String ( cur )
44
- if ( shouldUpdateValue ( elm , vnode , strCur ) ) {
44
+ if ( shouldUpdateValue ( elm , strCur ) ) {
45
45
elm . value = strCur
46
46
}
47
47
} else {
@@ -53,13 +53,9 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
53
53
// check platforms/web/util/attrs.js acceptValue
54
54
type acceptValueElm = HTMLInputElement | HTMLSelectElement | HTMLOptionElement ;
55
55
56
- function shouldUpdateValue (
57
- elm : acceptValueElm ,
58
- vnode : VNodeWithData ,
59
- checkVal : string
60
- ) : boolean {
56
+ function shouldUpdateValue ( elm : acceptValueElm , checkVal : string ) : boolean {
61
57
return ( ! elm . composing && (
62
- vnode . tag === 'option ' ||
58
+ elm . tagName === 'OPTION ' ||
63
59
isDirty ( elm , checkVal ) ||
64
60
isInputChanged ( elm , checkVal )
65
61
) )
You can’t perform that action at this time.
0 commit comments