BUGFIX: calling .blur() on the body element unfocus the browser window in IE10

This commit is contained in:
Régis Hanol 2014-07-03 22:26:11 +02:00
parent 7d5d5862c1
commit cfeae239a8

View file

@ -54,7 +54,9 @@ Discourse.Route.reopenClass({
if ($.magnificPopup && $.magnificPopup.instance) { $.magnificPopup.instance.close(); }
// Remove any link focus
$(document.activeElement).blur();
// NOTE: the '.not("body")' is here to prevent a bug in IE10 on Win7
// cf. https://stackoverflow.com/questions/5657371/ie9-window-loses-focus-due-to-jquery-mobile
$(document.activeElement).not("body").blur();
Discourse.set('notifyCount',0);
$('#discourse-modal').modal('hide');