Merge branch 'develop' of github.com:sampotts/plyr into develop
This commit is contained in:
commit
a064f0b4fd
6
src/js/controls.js
vendored
6
src/js/controls.js
vendored
@ -1140,7 +1140,9 @@ const controls = {
|
||||
} else if (is.keyboardEvent(input) && input.which === 27) {
|
||||
show = false;
|
||||
} else if (is.event(input)) {
|
||||
const isMenuItem = popup.contains(input.target);
|
||||
// If Plyr is in a shadowDOM, the event target is set to the component, instead of the
|
||||
// element in the shadowDOM. The path, however, is complete.
|
||||
const isMenuItem = popup.contains(input.path[0]);
|
||||
|
||||
// If the click was inside the menu or if the click
|
||||
// wasn't the button or menu item and we're trying to
|
||||
@ -1193,7 +1195,7 @@ const controls = {
|
||||
|
||||
// Show a panel in the menu
|
||||
showMenuPanel(type = '', tabFocus = false) {
|
||||
const target = document.getElementById(`plyr-settings-${this.id}-${type}`);
|
||||
const target = this.elements.container.querySelector(`#plyr-settings-${this.id}-${type}`);
|
||||
|
||||
// Nothing to show, bail
|
||||
if (!is.element(target)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user