Work on controls

This commit is contained in:
Sam Potts
2018-06-18 21:39:47 +10:00
parent 599883e684
commit ffd864ed39
11 changed files with 240 additions and 269 deletions

View File

@ -486,13 +486,12 @@ class Listeners {
});
// Settings menu
bind(this.player.elements.settings.form, 'click', event => {
bind(this.player.elements.settings.popup, 'click', event => {
event.stopPropagation();
// Go back to home tab on click
const showHomeTab = () => {
const id = `plyr-settings-${this.player.id}-home`;
controls.showTab.call(this.player, id);
controls.showMenu.call(this.player, 'home');
};
// Settings menu items - use event delegation as items are added/removed
@ -523,9 +522,6 @@ class Listeners {
},
'speed',
);
} else {
const tab = event.target;
controls.showTab.call(this.player, tab.getAttribute('aria-controls'));
}
});