diff --git a/src/platforms/web/runtime/modules/attrs.js b/src/platforms/web/runtime/modules/attrs.js index 317316d8507..729802cdb4e 100644 --- a/src/platforms/web/runtime/modules/attrs.js +++ b/src/platforms/web/runtime/modules/attrs.js @@ -1,6 +1,6 @@ /* @flow */ -import { isIE9, isEdge } from 'core/util/env' +import { isIE, isIE9, isEdge } from 'core/util/env' import { extend, @@ -44,7 +44,7 @@ function updateAttrs (oldVnode: VNodeWithData, vnode: VNodeWithData) { // #4391: in IE9, setting type can reset value for input[type=radio] // #6666: IE/Edge forces progress value down to 1 before setting a max /* istanbul ignore if */ - if ((isIE9 || isEdge) && attrs.value !== oldAttrs.value) { + if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { setAttr(elm, 'value', attrs.value) } for (key in oldAttrs) { @@ -84,6 +84,22 @@ function setAttr (el: Element, key: string, value: any) { if (isFalsyAttrValue(value)) { el.removeAttribute(key) } else { + // #7138: IE10 & 11 fires input event when setting placeholder on + // ` + }) + setTimeout(() => { + expect(vm.foo).toBe(null) + done() + }, 17) + }) + } })