Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commitb48c45e

Browse files
committed
ensure set value last in IE9 (fixvuejs#4391)
1 parent4c3abdd commitb48c45e

File tree

1 file changed

+6
-1
lines changed
  • src/platforms/web/runtime/modules

1 file changed

+6
-1
lines changed

‎src/platforms/web/runtime/modules/attrs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*@flow */
22

33
import{extend}from'shared/util'
4+
import{isIE9}from'core/util/env'
45
import{
56
isBooleanAttr,
67
isEnumeratedAttr,
@@ -17,7 +18,7 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) {
1718
letkey,cur,old
1819
constelm=vnode.elm
1920
constoldAttrs=oldVnode.data.attrs||{}
20-
letattrs=vnode.data.attrs||{}
21+
letattrs:any=vnode.data.attrs||{}
2122
// clone observed objects, as the user probably wants to mutate it
2223
if(attrs.__ob__){
2324
attrs=vnode.data.attrs=extend({},attrs)
@@ -30,6 +31,10 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) {
3031
setAttr(elm,key,cur)
3132
}
3233
}
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+
}
3338
for(keyinoldAttrs){
3439
if(attrs[key]==null){
3540
if(isXlink(key)){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp