1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Backport pull request #6413 from jellyfin-web/release-10.10.z

Prevent Focus Loss When Skip Button is Pressed

Original-merge: 4f17cebc02

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: thornbill <thornbill@users.noreply.github.com>
This commit is contained in:
rlauuzo 2025-01-22 03:12:46 -05:00 committed by thornbill
parent 05cce43ffd
commit 34ace6bc11
3 changed files with 41 additions and 16 deletions

View file

@ -20,6 +20,15 @@ interface ShowOptions {
function onHideComplete(this: HTMLButtonElement) {
if (this) {
// Handle focus after the hide transition completes
if (document.activeElement === this) {
this.blur();
const pauseButton = document.querySelector('.btnPause');
if (pauseButton && focusManager.isCurrentlyFocusable(pauseButton)) {
focusManager.focus(pauseButton);
}
}
this.classList.add('hide');
}
}