Better fix for IE9 issue with document.activeElement error (#1489008)

pull/64/head
Aleksander Machniak 12 years ago
parent 39f40104f0
commit f38d15c700

@ -178,6 +178,11 @@ function rcube_webmail()
parent.rcmail.env.frame_lock = null;
}
// Makes that reference to document.activeElement do not throw
// "unspecified error" in IE9 (#1489008)
if (this.env.framed && bw.ie)
document.documentElement.focus();
// enable general commands
this.enable_command('close', 'logout', 'mail', 'addressbook', 'settings', 'save-pref',
'compose', 'undo', 'about', 'switch-task', 'menu-open', 'menu-save', true);

@ -743,12 +743,8 @@ jQuery.fn.placeholder = function(text) {
});
// Do not blur currently focused element
// Catch "unspecified error" in IE9 (#1489008)
try {
if (this != document.activeElement)
elem.blur();
}
catch(e) {}
if (this != document.activeElement)
elem.blur();
}
});
};

Loading…
Cancel
Save