Fix active element
This commit is contained in:
parent
0118007cf2
commit
8bd5dba338
@ -178,19 +178,13 @@ const introSkipper = {
|
||||
overrideBlur(button) {
|
||||
if (!button.originalBlur) {
|
||||
button.originalBlur = button.blur;
|
||||
button.blur = () => {
|
||||
if (!button.contains(document.activeElement)) {
|
||||
button.originalBlur();
|
||||
button.blur = function() {
|
||||
if (!this.contains(document.activeElement)) {
|
||||
this.originalBlur();
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
restoreBlur(button) {
|
||||
if (button.originalBlur) {
|
||||
button.blur = button.originalBlur;
|
||||
delete button.originalBlur;
|
||||
}
|
||||
},
|
||||
/** Playback position changed, check if the skip button needs to be displayed. */
|
||||
videoPositionChanged() {
|
||||
if (!this.skipButton) return;
|
||||
@ -201,9 +195,12 @@ const introSkipper = {
|
||||
this.skipButton.classList.remove('show');
|
||||
embyButton.addEventListener("transitionend", () => {
|
||||
this.skipButton.classList.add("hide");
|
||||
this.restoreBlur(embyButton);
|
||||
embyButton.blur();
|
||||
this.allowEnter = true;
|
||||
if (this.osdVisible()) {
|
||||
this.osdElement.querySelector('button.btnPause').focus();
|
||||
} else {
|
||||
embyButton.originalBlur();
|
||||
}
|
||||
}, { once: true });
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user