mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-12-12 00:06:24 +00:00
Merge pull request #920 from dmitrylyzo/fix_slideshow-2
Fix slideshow 2
This commit is contained in:
commit
95f379021e
@ -242,9 +242,15 @@ define(['appRouter', 'focusManager', 'browser', 'layoutManager', 'inputManager',
|
|||||||
|
|
||||||
var onAnimationFinish = function () {
|
var onAnimationFinish = function () {
|
||||||
focusManager.pushScope(dlg);
|
focusManager.pushScope(dlg);
|
||||||
|
|
||||||
if (dlg.getAttribute('data-autofocus') === 'true') {
|
if (dlg.getAttribute('data-autofocus') === 'true') {
|
||||||
focusManager.autoFocus(dlg);
|
focusManager.autoFocus(dlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.activeElement && !dlg.contains(document.activeElement)) {
|
||||||
|
// Blur foreign element to prevent triggering of an action from the previous scope
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (enableAnimation()) {
|
if (enableAnimation()) {
|
||||||
|
@ -58,7 +58,15 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom', 'apphost'], funct
|
|||||||
sourceElement = focusManager.focusableParent(sourceElement);
|
sourceElement = focusManager.focusableParent(sourceElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceElement = sourceElement || 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) {
|
if (eventListenerCount) {
|
||||||
var customEvent = new CustomEvent("command", {
|
var customEvent = new CustomEvent("command", {
|
||||||
|
Loading…
Reference in New Issue
Block a user