mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-16 18:38:25 -07:00
Focus contextbutton after update if focused beforehand
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
parent
5626380d7f
commit
21b17e8097
@ -178,9 +178,13 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||
|
||||
let contextButton = context.querySelector('.btnToggleContextMenu');
|
||||
// We remove the previous event listener by replacing the item in each update event
|
||||
const autoFocusContextButton = document.activeElement === contextButton;
|
||||
let contextButtonClone = contextButton.cloneNode(true);
|
||||
contextButton.parentNode.replaceChild(contextButtonClone, contextButton);
|
||||
contextButton = context.querySelector('.btnToggleContextMenu');
|
||||
if (autoFocusContextButton) {
|
||||
contextButton.focus();
|
||||
}
|
||||
var options = {
|
||||
play: false,
|
||||
queue: false,
|
||||
|
Loading…
Reference in New Issue
Block a user