From: Alexander Ebert Date: Wed, 6 Nov 2013 13:40:17 +0000 (+0100) Subject: Added possible fix for broken media queries in Internet Explorer X-Git-Tag: 2.0.0_RC_1~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e76b6d51634b2c9bab410e7d06bd4c396a1ffec0;p=GitHub%2FWoltLab%2FWCF.git Added possible fix for broken media queries in Internet Explorer --- diff --git a/com.woltlab.wcf/templates/headInclude.tpl b/com.woltlab.wcf/templates/headInclude.tpl index ecc369ff9c..31d3236f64 100644 --- a/com.woltlab.wcf/templates/headInclude.tpl +++ b/com.woltlab.wcf/templates/headInclude.tpl @@ -177,6 +177,20 @@ {if $__sessionKeepAlive|isset} new WCF.System.KeepAlive({@$__sessionKeepAlive}); {/if} + + // Internet Explorer seems to be unable to properly revert CSS applied through + // media queries and sometimes temporarily apply them on init even though they + // should not match + if ($.browser.msie) { + var $sidebar = $('#main > div > div .sidebar'); + function fixSidebarIE() { + $sidebar.css('display', 'none').css('display', ''); + } + + fixSidebarIE(); + $(window).resize(fixSidebarIE); + + } }); //]]>