mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Prevent Focus Loss When Skip Button is Pressed (#6413)
* Prevent Focus Loss When Skip Button is Pressed * Implement the suggested changes * Update index.js * Ensures focus shifts to the pause button * Apply suggested changes --------- Co-authored-by: rlauu <46294892+rlauu@users.noreply.github.com>
This commit is contained in:
parent
700e72b409
commit
4f17cebc02
3 changed files with 41 additions and 16 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue