Fix overflow issue on small players with menu open

This commit is contained in:
Sam Potts 2017-11-23 22:32:07 +11:00
parent 61325bbad1
commit f7bf0961cf
8 changed files with 12 additions and 4 deletions

2
demo/dist/demo.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

1
src/js/controls.js vendored
View File

@ -767,6 +767,7 @@ const controls = {
if (utils.is.htmlElement(form)) { if (utils.is.htmlElement(form)) {
form.setAttribute('aria-hidden', !show); form.setAttribute('aria-hidden', !show);
utils.toggleClass(this.elements.container, this.config.classNames.menu.open, show);
if (show) { if (show) {
form.removeAttribute('tabindex'); form.removeAttribute('tabindex');

View File

@ -282,6 +282,7 @@ const defaults = {
menu: { menu: {
value: 'plyr__menu__value', value: 'plyr__menu__value',
badge: 'plyr__badge', badge: 'plyr__badge',
open: 'plyr--menu-open',
}, },
captions: { captions: {
enabled: 'plyr--captions-enabled', enabled: 'plyr--captions-enabled',

View File

@ -24,6 +24,7 @@
border-radius: inherit; border-radius: inherit;
} }
// Ignore focus
&:focus { &:focus {
outline: 0; outline: 0;
} }

View File

@ -4,6 +4,11 @@
.plyr--video { .plyr--video {
overflow: hidden; overflow: hidden;
// Menu open
&.plyr--menu-open {
overflow: visible;
}
} }
.plyr__video-wrapper { .plyr__video-wrapper {