Prevent default on settings icon click
This commit is contained in:
parent
dfc09b8e04
commit
400fd77d0a
@ -603,12 +603,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(
|
||||||
|
elements.buttons.settings,
|
||||||
|
'click',
|
||||||
|
event => {
|
||||||
// Prevent the document click listener closing the menu
|
// Prevent the document click listener closing the menu
|
||||||
event.stopPropagation();
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user