update dialogs

This commit is contained in:
Luke Pulverenti 2016-03-22 14:02:37 -04:00
parent 749d9ba550
commit a048a3c69a
4 changed files with 18 additions and 8 deletions

View file

@ -100,6 +100,9 @@
}
animateDialogOpen(dlg);
// Undo the auto-focus applied by the native dialog element
safeBlur(document.activeElement);
if (dlg.getAttribute('data-autofocus') == 'true') {
focusManager.autoFocus(dlg);
}
@ -118,6 +121,12 @@
}
}
function safeBlur(el) {
if (el && el.blur && el != document.body) {
el.blur();
}
}
function addBackdropOverlay(dlg) {
var backdrop = document.createElement('div');