mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
fix(time-display): fix IE11 appending times instead of replacing (#7059)
IE11 only supports HTMLElement and not text nodes in the contains method. See https://developer.mozilla.org/en-US/docs/Web/API/Node/contains Instead, compare firstChild.
This commit is contained in:
parent
dceedb6746
commit
ed3c54d13a
@ -89,7 +89,7 @@ class TimeDisplay extends Component {
|
||||
|
||||
let oldNode = this.textNode_;
|
||||
|
||||
if (oldNode && !this.contentEl_.contains(oldNode)) {
|
||||
if (oldNode && this.contentEl_.firstChild !== oldNode) {
|
||||
oldNode = null;
|
||||
|
||||
log.warn('TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user