mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Always try to blur foreign element
This commit is contained in:
parent
4d6f187aee
commit
53d2e8c0d2
1 changed files with 4 additions and 1 deletions
|
@ -242,9 +242,12 @@ 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);
|
||||||
} else if (document.activeElement && !dlg.contains(document.activeElement)) {
|
}
|
||||||
|
|
||||||
|
if (document.activeElement && !dlg.contains(document.activeElement)) {
|
||||||
// Blur foreign element to prevent triggering of an action from the previous scope
|
// Blur foreign element to prevent triggering of an action from the previous scope
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue