YouTube speed menu fix

This commit is contained in:
Sam Potts
2018-04-03 22:30:29 +10:00
parent b1e3abc795
commit 91d192dd7c
18 changed files with 1960 additions and 900 deletions

View File

@ -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();
}