File tree 1 file changed +6
-1
lines changed
src/platforms/web/runtime/modules
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
3
import { extend } from 'shared/util'
4
+ import { isIE9 } from 'core/util/env'
4
5
import {
5
6
isBooleanAttr ,
6
7
isEnumeratedAttr ,
@@ -17,7 +18,7 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) {
17
18
let key , cur , old
18
19
const elm = vnode . elm
19
20
const oldAttrs = oldVnode . data . attrs || { }
20
- let attrs = vnode . data . attrs || { }
21
+ let attrs : any = vnode . data . attrs || { }
21
22
// clone observed objects, as the user probably wants to mutate it
22
23
if ( attrs . __ob__ ) {
23
24
attrs = vnode . data . attrs = extend ( { } , attrs )
@@ -30,6 +31,10 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) {
30
31
setAttr ( elm , key , cur )
31
32
}
32
33
}
34
+ // #4391: in IE9, setting type can reset value for input[type=radio]
35
+ if ( isIE9 && attrs . value !== oldAttrs . value ) {
36
+ setAttr ( elm , 'value' , attrs . value )
37
+ }
33
38
for ( key in oldAttrs ) {
34
39
if ( attrs [ key ] == null ) {
35
40
if ( isXlink ( key ) ) {
You can’t perform that action at this time.
0 commit comments