aboutsummaryrefslogtreecommitdiffstats
path: root/demo/dist/demo.js
diff options
context:
space:
mode:
Diffstat (limited to 'demo/dist/demo.js')
-rw-r--r--demo/dist/demo.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/demo/dist/demo.js b/demo/dist/demo.js
index 6fe57ef3..d68289b8 100644
--- a/demo/dist/demo.js
+++ b/demo/dist/demo.js
@@ -4097,6 +4097,9 @@ typeof navigator === "object" && (function () {
document.addEventListener('DOMContentLoaded', function () {
singleton.context(function () {
+ var selector = '#player';
+ var container = document.getElementById('container');
+
if (window.shr) {
window.shr.setup({
count: {
@@ -4110,6 +4113,9 @@ typeof navigator === "object" && (function () {
// Remove class on blur
document.addEventListener('focusout', function (event) {
+ if (container.contains(event.target)) {
+ return;
+ }
event.target.classList.remove(tabClassName);
});
@@ -4122,12 +4128,18 @@ typeof navigator === "object" && (function () {
// Delay the adding of classname until the focus has changed
// This event fires before the focusin event
setTimeout(function () {
- document.activeElement.classList.add(tabClassName);
- }, 0);
+ var focused = document.activeElement;
+
+ if (!focused || container.contains(focused)) {
+ return;
+ }
+
+ focused.classList.add(tabClassName);
+ }, 10);
});
// Setup the player
- var player = new Plyr('#player', {
+ var player = new Plyr(selector, {
debug: true,
title: 'View From A Blue Moon',
iconUrl: '../dist/plyr.svg',