Commit 04db6cf8 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Don't do DOM dance if it has a parentNode

Otherwise we might mess up a script trying to reparent it elsewhere.
This fixes Netflix...

BUG: 432043
parent 9948b1cc
......@@ -863,7 +863,9 @@ function loadMediaSessionsShim() {
player.removeEventListener("play", player.registerInDom);
// If it is already in DOM by the time it starts playing, we don't need to do anything
if (document.body && document.body.contains(player)) {
// Also, if the page already parented it around, don't mess with it
if (document.documentElement.contains(player)
|| player.parentNode) {
delete player.dataset.pbiPausedForDomRemoval;
player.removeEventListener("pause", player.replayAfterRemoval);
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment