From e76b6d51634b2c9bab410e7d06bd4c396a1ffec0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 6 Nov 2013 14:40:17 +0100 Subject: [PATCH] Added possible fix for broken media queries in Internet Explorer --- com.woltlab.wcf/templates/headInclude.tpl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); + + } }); //]]> -- 2.20.1