mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-12-04 04:02:03 +00:00
Fix event source for inputManager
This commit is contained in:
parent
305f050003
commit
4d6f187aee
@ -58,7 +58,15 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom', 'apphost'], funct
|
||||
sourceElement = focusManager.focusableParent(sourceElement);
|
||||
}
|
||||
|
||||
sourceElement = sourceElement || document.querySelector('.dialogContainer .dialog.opened') || document.activeElement || window;
|
||||
if (!sourceElement) {
|
||||
sourceElement = document.activeElement || window;
|
||||
|
||||
var dlg = document.querySelector('.dialogContainer .dialog.opened');
|
||||
|
||||
if (dlg && (!sourceElement || !dlg.contains(sourceElement))) {
|
||||
sourceElement = dlg;
|
||||
}
|
||||
}
|
||||
|
||||
if (eventListenerCount) {
|
||||
var customEvent = new CustomEvent("command", {
|
||||
|
Loading…
Reference in New Issue
Block a user