Bug Tracker


Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11048 closed bug (fixed)

Support Tests affect layout for positioned elements in IE6-9

Reported by: anonymous Owned by: mikesherov
Priority: blocker Milestone: 1.7.2
Component: support Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


jQuery 1.7 and 1.7.1 breaks all Internet Explorers. Looks like a problem with absolute elements. All absolute divs are lowered after document-ready. No problem with 1.6.4 or earlier. No problem with FF, Chrome and Opera (only IE).

Change History (14)

comment:1 Changed 5 years ago by boushley

So I've gotten this jsFiddle put together: http://jsfiddle.net/boushley/wryLs/2/ and I can't reproduce the error. This seems to render fine in Chrome for me, and IE. Without more information I think we should close this.

comment:2 Changed 5 years ago by boushley

  • Owner set to anonymous
  • Status changed from new to pending

comment:3 Changed 5 years ago by anonymous

  • Status changed from pending to new

Wait, I'll try to give you more information. I'll try to reproduce it in jsFiddle.

comment:4 Changed 5 years ago by anonymous

I worked today on this issue and here's what I found:

-This issue relates to 'position: relative' elements (not absolute elements nested in relative elements, as I thought at first glance). -Look at this on IE6 (green box is shifted down by 25 pixels, it should be placed at the top of blue box):


-XHMTL 1.0 Transitional is used in jsFiddle example like on my website.

Any thoughts?

comment:5 Changed 5 years ago by timmywil

  • Component changed from unfiled to support
  • Milestone changed from None to 1.7.2
  • Priority changed from undecided to blocker
  • Status changed from new to open

comment:6 Changed 5 years ago by Youri

This does not happen on all IE versions. IE 9.0.8112 (and assuming all other IE9 versions) shows the green box perfectly in the left top corner on all of the provided fiddles.

Is it possible to provide a link to the example you use on your site?

EDIT: I've now also tested this in IE versions 6-8 and never have I seen the green box out of place. Am I missing something or is there no bug?

Last edited 5 years ago by Youri (previous) (diff)

comment:7 Changed 5 years ago by anonymous

Youri, are you using original preinstalled IE6?

Here's what I and timmywil get:


(screenshot from http://jsfiddle.net/timmywil/wryLs/59/ example).

comment:8 Changed 5 years ago by Youri

No, it was run on a VM. Seems like there is a css problem then. Try this fiddle: http://jsfiddle.net/wryLs/65/ I think that for some reason it took the spacing in the html as a space and made the next element (green box) go a line down, so without the spacing it might work.

Either way I don't see how it can be related to JS since that's not being used here.

comment:9 Changed 5 years ago by anonymous

Thanks for trying to help. I tried your fiddle. Same result (box is shifted down).

Shift happens only because jQuery is included in head tag (zero my code). Removing usage of jQuery fixes the problem. New jQuery (1.7+) repositions relative elements in IE after document.ready event.

Unfortunately I'm not familiar with jQuery code to say what it does for IE browsers in it's internal ready event.

comment:10 Changed 5 years ago by mikesherov

This is most definitely caused by moving some of the support tests to after dom ready. The problem went away after I applied the changes from https://github.com/jquery/jquery/pull/642 to my codebase, which remove a lot of the "offset" support test stuff.

I'll see if I can fix this without obliterating the support tests, but I'm not sure it'll be necessary if https://github.com/jquery/jquery/pull/642 gets merged.

comment:11 Changed 5 years ago by mikesherov

  • Owner changed from anonymous to mikesherov
  • Status changed from open to assigned

comment:13 Changed 5 years ago by mikesherov

  • Summary changed from Broken IE6-IE9 with jQuery 1.7 and 1.7.1 to Support Tests affect layout for positioned elements in IE6-9

comment:14 Changed 5 years ago by Mike Sherov

  • Resolution set to fixed
  • Status changed from assigned to closed

fixes #11048: make sure support tests don't modify the layout of the body

Changeset: 2982abbb13454bd4bdf0299f1183fb0d8c02f02d

Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Modify Ticket

Change Properties

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.