Skip to content

Commit

Permalink
Revert "fix select multiple first option auto-selected in Chrome/FF (fix
Browse files Browse the repository at this point in the history
 #3852)"

This reverts commit f9bef75.
  • Loading branch information
yyx990803 committed Oct 11, 2016
1 parent 8bb1e58 commit d0cfd54
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/platforms/web/runtime/modules/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ function setAttr (el: Element, key: string, value: any) {
}

export default {
create: function initAttrs (_: VNodeWithData, vnode: VNodeWithData) {
updateAttrs(_, vnode)
// #3852: if the "multiple" attribute is added to a <select> element
// when the children options have already been appended, Chrome/Firefox
// auto-selects the first option.
const el: any = vnode.elm
if (vnode.tag === 'select' && el.multiple) {
el.options[0] && (el.options[0].selected = false)
}
},
create: updateAttrs,
update: updateAttrs
}

0 comments on commit d0cfd54

Please sign in to comment.