mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix event source for inputManager in case of multiple open dialogs
This commit is contained in:
parent
0afe85810d
commit
f292053b49
1 changed files with 5 additions and 2 deletions
|
@ -66,9 +66,12 @@ import appHost from 'apphost';
|
|||
if (!sourceElement) {
|
||||
sourceElement = document.activeElement || window;
|
||||
|
||||
const dlg = document.querySelector('.dialogContainer .dialog.opened');
|
||||
const dialogs = document.querySelectorAll('.dialogContainer .dialog.opened');
|
||||
|
||||
if (dlg && (!sourceElement || !dlg.contains(sourceElement))) {
|
||||
// Suppose the top open dialog is active
|
||||
const dlg = dialogs.length ? dialogs[dialogs.length - 1] : null;
|
||||
|
||||
if (dlg && !dlg.contains(sourceElement)) {
|
||||
sourceElement = dlg;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue