{"id":1479,"date":"2011-03-17T23:22:07","date_gmt":"2011-03-17T21:22:07","guid":{"rendered":"https:\/\/www.optimiced.com\/en\/?p=1479"},"modified":"2011-03-18T15:36:20","modified_gmt":"2011-03-18T13:36:20","slug":"ie9-background-shifting-bug","status":"publish","type":"post","link":"https:\/\/www.optimiced.com\/en\/2011\/03\/17\/ie9-background-shifting-bug\/","title":{"rendered":"IE9 background shifting bug"},"content":{"rendered":"<p>On Tuesday, I mentioned that the brand-new <a href=\"https:\/\/www.optimiced.com\/en\/2011\/03\/15\/ie6-ie9-10-years\/\">IE9 browser<\/a> is out; yesterday and today, I am already fighting with the first IE9-bug I encountered&#8230; :-(<\/p>\n<p>The story in short: I installed IE9 mainly because I was curious to see how good is the support for some of the new CSS3 properties &#8212; rounded corners, box-shadows, text-shadow, gradients, transitions, and so on.<\/p>\n<p>So, as soon as IE9 was officially released, I installed it, then restarted my Win7 machine, and lo and behold! in one of the first designs I tested in it, I found a new bug <em>(new in the sense: a bug that I never encountered in IE8 or IE7)<\/em>: a strange one-pixel shift in the background image of a page, when (un)certain conditions are met!<\/p>\n<p>Here&#8217;s a test page:<\/p>\n<p><strong><a href=\"https:\/\/www.optimiced.com\/lab\/2011\/ie9-background-bug\/\">https:\/\/www.optimiced.com\/lab\/2011\/ie9-background-bug\/<\/a><\/strong><\/p>\n<p>Test conditions:<\/p>\n<p>&#8212; <a href=\"http:\/\/www.beautyoftheweb.com\/downloadie9\">Internet Explorer 9<\/a> (you need Windows <strong>Vista<\/strong> or Windows <strong>7<\/strong>; Windows XP is not supported).<br \/>\n&#8212; The browser window <strong>must be maximized<\/strong>.<br \/>\n&#8212; I tested with the following screen resolutions: 1680&#215;1050, 1440&#215;900. (Not sure if bug will happen if your screen is larger or smaller.)<br \/>\n&#8212; Open <a href=\"https:\/\/www.optimiced.com\/lab\/2011\/ie9-background-bug\/\">the test page<\/a>, wait for it to load.<br \/>\n&#8212; With the mouse, <em>scroll down to the bottom of the page<\/em>, then <em>up to the beginning<\/em>. You have a 50%\/50% chance to see a one-pixel shift in some part of the background of the page, in the upper part! (At least, I see such 1px shift&#8230;)<br \/>\n&#8212; If you refresh the page, bug is gone. If you scroll again down-up once or twice, bug is back again!<br \/>\n&#8212; (Update 1) If the <strong>Menu Bar<\/strong> is not open in IE9, the bug is <strong>not<\/strong> triggered. If the Menu Bar is open, it is triggered! (Just in case: <a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-toolbars-open.png\">screenshot of the toolbars<\/a> that are open when the bug can be reproduced: Menu bar, Status bar.)<br \/>\n&#8212; (Update 2) If you have AERO disabled, the bug won&#8217;t show up (for example, if you use Windows Classic or Windows 7 Basic theme). If AERO is enabled (Windows 7 theme, with AERO = &#8220;ON&#8221;), the bug is there! (Big thanks to <a href=\"http:\/\/kissyour.net\">Adam Kiss<\/a>, who made some tests.)<br \/>\n&#8212; (Update 3) &#8220;<a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-tabs.png\">Show tabs on a separate row<\/a>&#8221; should not be enabled (and it&#8217;s not, by default). If you select &#8220;shows tabs on a separate row&#8221;, bug will disappear too (?).<br \/>\n&#8212; If you put more <em>Lorem Ipsum<\/em> text in the main column, bug is gone.<br \/>\n&#8212; If you reduce (or increase?) the height of the main column (<code>#content<\/code>) in which the Lorem Ipsum text is located, the bug no longer appears. Currently, the <code>div#content<\/code> has a <code>min-height<\/code> of 500px.<br \/>\n&#8212; If you minimize the window of IE9 and then back again to maximized state, the bug disappears (page is re-rendered after a minimize > restore-back-to-maximized operation).<br \/>\n&#8212; The 1px shift occurs only in the upper part of the background image, and quite randomly.<\/p>\n<p>Now, the background image is applied to the <strong>body<\/strong> element:<\/p>\n<p><code><br \/>\nbody {<br \/>\nbackground: #8F8F8F url(..\/img\/body-test.png) 0 0 repeat-x;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>&#8230;and there is nothing special in the code.<\/p>\n<p>The left part of this <a href=\"https:\/\/www.optimiced.com\/lab\/2011\/ie9-background-bug\/img\/body-test.png\">background-image<\/a> is the original image, the right part is for testing purposes &#8212; the horizontal lines help see if there are any shifts in the background image position. Otherwise, that was the <a href=\"https:\/\/www.optimiced.com\/lab\/2011\/ie9-background-bug\/img\/body-how-should-be.png\">original<\/a>.<\/p>\n<p>After many tries I discovered that the format of the background image does not matter (PNG, JPG, GIF&#8230;) as well as its size.<\/p>\n<p>You can scroll with a mouse or the up-down arrows on the keyboard.<\/p>\n<p>Of course, it&#8217;s possible that something in my setup (Win7\/IE9) is wrong and so any kind of third-party confirmation for the existence (or non-existense) of this bug would be appreciated! (Btw, I never saw such a bug in IE7\/8, Firefox, Opera, Safari, Chrome. Only in IE9.)<\/p>\n<p>Here&#8217;s how the test page is supposed to look:<\/p>\n<p><a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen1.png\" title=\"{iebug} IE9: normal view of the upper part of the page\"><img decoding=\"async\" src=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen1.640.png\" alt=\"\" \/><\/a><\/p>\n<p>And here how it looks after a couple of scrollings down\/up:<\/p>\n<p><a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen2.png\" title=\"{iebug} IE9: After scrolling down and then back up, here's how the upper part of the page looks like\"><img decoding=\"async\" src=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen2.640.png\" alt=\"\" \/><\/a><\/p>\n<p>Also please note that after scrolling down\/up, and then mouse-overing the elements in the navigation, another visual strangeness happens:<\/p>\n<p><a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen3.png\" title=\"{iebug} IE9: How it looks after scrolling down\/up and then mouseovering elements in the nav...\"><img decoding=\"async\" src=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-bug-screen3.640.png\" alt=\"\" \/><\/a><\/p>\n<p>So, in &#8220;ideal conditions&#8221;, the page should look <a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-how-it-should-look.png\" title=\"{iebug} How it should look in all browsers\">like this<\/a>, but after some scrolling, here&#8217;s how it <a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-how-it-looks-after-scrolling1.png\" title=\"{iebug} ...And how it actually looks in IE9, after scrolling the page...\">looks like<\/a> (or even <a href=\"https:\/\/www.optimiced.com\/wp-uploads\/2011\/03\/ie9-how-it-looks-after-scrolling2.png\" title=\"{iebug} ...or like this...\">like this<\/a>).<\/p>\n<p>* * * <\/p>\n<p>Otherwise, testing IE9 is fun &#8212; for now I see that CSS3 transitions and text-shadows are not supported. Border-radius and box-shadow are supported, though, which is nice. I&#8217;ll be testing more.<\/p>\n<p>Any help is appreciated! Did I discover a bug? If yes, what triggers it?&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Tuesday, I mentioned that the brand-new IE9 browser is out; yesterday and today, I am already fighting with the first IE9-bug I encountered&#8230; :-( The story in short: I installed IE9 mainly because I was curious to see how good is the support for some of the new CSS3 properties &#8212; rounded corners, box-shadows,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,14],"tags":[],"class_list":["post-1479","post","type-post","status-publish","format-standard","hentry","category-browsers","category-css"],"_links":{"self":[{"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/posts\/1479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/comments?post=1479"}],"version-history":[{"count":3,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/posts\/1479\/revisions"}],"predecessor-version":[{"id":1491,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/posts\/1479\/revisions\/1491"}],"wp:attachment":[{"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/media?parent=1479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/categories?post=1479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.optimiced.com\/en\/wp-json\/wp\/v2\/tags?post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}