FIX: ensures we have an elementFromPoint before using it (#7583)

This commit is contained in:
Joffrey JAFFEUX 2019-05-21 21:26:54 +02:00 committed by GitHub
parent e8de30939d
commit 0ed1cfd8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,11 @@ export default MountWidget.extend({
// We use this because watching videos fullscreen in Chrome was super buggy
// otherwise. Thanks to arrendek from q23 for the technique.
if (document.elementFromPoint(0, 0).tagName.toUpperCase() === "IFRAME") {
const topLeftCornerElement = document.elementFromPoint(0, 0);
if (
topLeftCornerElement &&
topLeftCornerElement.tagName.toUpperCase() === "IFRAME"
) {
return;
}