Don't move caption up when "showing" the lower controls when the controls are empty

This commit is contained in:
Albin Larsson 2018-07-30 01:02:13 +02:00
parent 5eda498516
commit e5e169a1e2
2 changed files with 7 additions and 7 deletions

9
src/js/controls.js vendored
View File

@ -1455,12 +1455,9 @@ const controls = {
target = this.elements.container;
}
// Inject controls HTML
if (is.element(container)) {
target.appendChild(container);
} else if (container) {
target.insertAdjacentHTML('beforeend', container);
}
// Inject controls HTML (needs to be before captions, hence "afterbegin")
const insertMethod = is.element(container) ? 'insertAdjacentElement' : 'insertAdjacentHTML';
target[insertMethod]('afterbegin', container);
// Find the elements if need be
if (!is.element(this.elements.controls)) {

View File

@ -112,4 +112,7 @@
.plyr__controls:empty {
display: none;
}
~ .plyr__captions {
transform: translateY(0px);
}
}