Fix dialog on IE when document.activeElement null