Merge branch 'develop' of github.com:sampotts/plyr into develop

This commit is contained in:
Sam Potts 2020-02-09 21:42:54 +00:00
commit 95431639a0

View File

@ -599,12 +599,19 @@ class Listeners {
this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay'); this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay');
// Settings menu - click toggle // Settings menu - click toggle
this.bind(elements.buttons.settings, 'click', event => { this.bind(
// Prevent the document click listener closing the menu elements.buttons.settings,
event.stopPropagation(); 'click',
event => {
// Prevent the document click listener closing the menu
event.stopPropagation();
event.preventDefault();
controls.toggleMenu.call(player, event); controls.toggleMenu.call(player, event);
}); },
null,
false
); // Can't be passive as we're preventing default
// Settings menu - keyboard toggle // Settings menu - keyboard toggle
// We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus