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 () {
|
||||
focusManager.pushScope(dlg);
|
||||
|
||||
if (dlg.getAttribute('data-autofocus') === 'true') {
|
||||
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
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue