Merge pull request #87 from zmitroc/blur-body-IE
Bugfix for IE when blur occurs on <body>
This commit is contained in:
Коммит
3a45d7ddbd
|
@ -198,7 +198,9 @@
|
|||
}).join(', ');
|
||||
target = this.dialog_.querySelector(query);
|
||||
}
|
||||
document.activeElement && document.activeElement.blur && document.activeElement.blur();
|
||||
if (document.activeElement && document.activeElement.blur && document.activeElement.nodeName.toLowerCase() !== "body") {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
target && target.focus();
|
||||
},
|
||||
|
||||
|
@ -381,7 +383,9 @@
|
|||
if (candidate != this.topDialogElement()) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.target.blur();
|
||||
if (event.target.nodeName.toLowerCase() !== "body") {
|
||||
event.target.blur();
|
||||
}
|
||||
// TODO: Focus on the browser chrome (aka document) or the dialog itself
|
||||
// depending on the tab direction.
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче