Added possible fix for broken media queries in Internet Explorer
authorAlexander Ebert <ebert@woltlab.com>
Wed, 6 Nov 2013 13:40:17 +0000 (14:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 6 Nov 2013 13:40:17 +0000 (14:40 +0100)
com.woltlab.wcf/templates/headInclude.tpl

index ecc369ff9cbd485c0e528f57ffcdd4f89f4d3edb..31d3236f642e06e21897dd8394ecb3dfabc36d1c 100644 (file)
                {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);
+                       
+               }
        });
        //]]>
 </script>