Don't move caption up when "showing" the lower controls when the controls are empty
This commit is contained in:
parent
5eda498516
commit
e5e169a1e2
9
src/js/controls.js
vendored
9
src/js/controls.js
vendored
@ -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)) {
|
||||
|
@ -112,4 +112,7 @@
|
||||
|
||||
.plyr__controls:empty {
|
||||
display: none;
|
||||
~ .plyr__captions {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user