Skip to content

Commit 0f2cb09

Browse files
committedOct 2, 2017
fix: work around old Chrome bug
fix #6601
1 parent dd50543 commit 0f2cb09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/platforms/web/runtime/modules/dom-props.js

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
2828
if (key === 'textContent' || key === 'innerHTML') {
2929
if (vnode.children) vnode.children.length = 0
3030
if (cur === oldProps[key]) continue
31+
// #6601 work around Chrome version <= 55 bug where single textNode
32+
// replaced by innerHTML/textContent retains its parentNode property
33+
if (elm.childNodes.length === 1) {
34+
elm.removeChild(elm.childNodes[0])
35+
}
3136
}
3237

3338
if (key === 'value') {

0 commit comments

Comments
 (0)