Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix IE layout bug from support tests. #12869 #1025

Closed
wants to merge 1 commit into from

4 participants

Scott González Mike Sherov Phil Wareham Dave Methvin
Scott González

No description provided.

Mike Sherov
Collaborator

@scottgonzalez, do a blame on the file and see why the old line was present. I believe this was me fixing a bug in actual IE6.

Scott González

Ok, I'll test against the fiddle from #11048.

Scott González

@mikesherov I tested against the previous bug, and this doesn't cause a regression.

In jQuery 1.7.1 (prior to the fix for #11048), the positioned element shifted down several pixels. If you run the same test against 1.7.2 with the zoom removed, the element is shifted down a few pixels (improved, but not fixed). Setting the zoom on either the container or the body prevents the element from shifting down.

I've added another comment to the line I changed to reference the old ticket as well, so that it's clear what this line is doing.

Dave Methvin

I was concerned this might reset a zoom the user selected from a previous visit, but the user's zoom setting (from IE's menu or control-wheel on the mouse) does not seem to affect body.style.zoom.

Phil Wareham

Using jQuery 1.9beta1 I'm seeing the style="zoom: 1; " showing up on the <body> tag in webkit browsers. Possibly a bug related to this commit?

Scott González

@philwareham Is that causing issues for you or do you just not like the style being there?

Phil Wareham

Well, for one thing zoom is not a valid CSS rule, it's an IE proprietary rule that even they have deprecated at IE9 so it should never be visible to modern browsers.

It's creating loads of CSS error warnings in the console on Opera.

Basically, if you are going to use it, make sure it's only applied to IE < 9 and nothing else.

Mescoda mescoda referenced this pull request from a commit in mescoda/jquery
Scott González scottgonzalez Fix #12869. Zoom the body after support tests; avoids layout changes …
…in IE8/9/10 in IE7 mode. Close gh-1025.
2a282f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 15, 2012
  1. Scott González

    Set zoom on the body after running support tests to avoid layout chan…

    scottgonzalez authored
    …ges in IE8/9/10 running in IE 7 mode. Fixes #12869.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/support.js
4 src/support.js
View
@@ -250,7 +250,9 @@ jQuery.support = (function() {
div.firstChild.style.width = "5px";
support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
- container.style.zoom = 1;
+ // Prevent IE 6 from affecting layout for positioned elements #11048
+ // Prevent IE from shrinking the body in IE 7 mode #12869
+ body.style.zoom = 1;
}
// Null elements to avoid leaks in IE
Something went wrong with that request. Please try again.