Skip to content

Commit

Permalink
fix: work around old Chrome bug
Browse files Browse the repository at this point in the history
fix #6601
  • Loading branch information
yyx990803 committed Oct 2, 2017
1 parent dd50543 commit 0f2cb09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/platforms/web/runtime/modules/dom-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
if (key === 'textContent' || key === 'innerHTML') {
if (vnode.children) vnode.children.length = 0
if (cur === oldProps[key]) continue
// #6601 work around Chrome version <= 55 bug where single textNode
// replaced by innerHTML/textContent retains its parentNode property
if (elm.childNodes.length === 1) {
elm.removeChild(elm.childNodes[0])
}
}

if (key === 'value') {
Expand Down

0 comments on commit 0f2cb09

Please sign in to comment.