Ticket #6792 (closed bug: duplicate)
Adding jquery script link breaks some layouts in IE8 compat mode
|Reported by:||dwlovell||Owned by:|
|Keywords:||script link layout IE8 compatibility absolute positioning||Cc:|
When testing some complex layouts using absolute positioning, they work fine in all browsers. However, adding the jquery script link to the page without making any calls to jquery results in a broken layout in IE8 compat mode until the browser is resized by at least 1 pixel in any direction.
This does not repro on 100% of machines, but I have reproed on XP/IE8, Vista/IE8, Win7/IE8 and Win2008R2/IE8. Compatibility mode is required for the bug to surface.
In the attached sample, when loading the page, you should see a red box which scales to the browser size with a 50px outer margin in all directions using abs positioning. When you load in the affected browser configuration, you will see a blank screen when you first load the file. If you resize the browser, the layout corrects itself. If you remove the jquery link, the red box is visible when the page is first loaded regardless of resize.
I want to re-iterate that this does not repro on every machine, but it appears for us on the majority of workstations, including VMs with base OS and base IE8 installations.
This could be an underlying IE8/compat rendering engine defect, however it only appears to surface for us when jquery is added.