From 91d192dd7c27edb877669d4e331ce8e8856e4cb6 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Tue, 3 Apr 2018 22:30:29 +1000 Subject: YouTube speed menu fix --- src/js/fullscreen.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/js/fullscreen.js') diff --git a/src/js/fullscreen.js b/src/js/fullscreen.js index cd31f60b..55b5c804 100644 --- a/src/js/fullscreen.js +++ b/src/js/fullscreen.js @@ -68,13 +68,15 @@ class Fullscreen { }); // Fullscreen toggle on double click - utils.on(this.player.elements.container, 'dblclick', () => { + utils.on(this.player.elements.container, 'dblclick', event => { + // Ignore double click in controls + if (this.player.elements.controls.contains(event.target)) { + return; + } + this.toggle(); }); - // Prevent double click on controls bubbling up - utils.on(this.player.elements.controls, 'dblclick', event => event.stopPropagation()); - // Update the UI this.update(); } -- cgit v1.2.3