1 | /* |
---|
2 | IE7, version 0.9 (alpha) (2005-08-19) |
---|
3 | Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/) |
---|
4 | License: http://creativecommons.org/licenses/LGPL/2.1/ |
---|
5 | */ |
---|
6 | IE7.addModule("ie7-squish", function() { |
---|
7 | |
---|
8 | /* --------------------------------------------------------------------- |
---|
9 | |
---|
10 | Squish some IE bugs! |
---|
11 | |
---|
12 | Some of these bug fixes may have adverse effects so they are |
---|
13 | not included in the standard library. Add your own if you want. |
---|
14 | |
---|
15 | -dean |
---|
16 | |
---|
17 | --------------------------------------------------------------------- */ |
---|
18 | |
---|
19 | // @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack" |
---|
20 | |
---|
21 | // "doubled margin" bug |
---|
22 | // http://www.positioniseverything.net/explorer/doubled-margin.html |
---|
23 | ie7CSS.addFix(/float\s*:\s*(left|right)/, "display:inline;$1"); |
---|
24 | |
---|
25 | if (ie7Layout) { |
---|
26 | // "peekaboo" bug |
---|
27 | // http://www.positioniseverything.net/explorer/peekaboo.html |
---|
28 | if (appVersion >= 6) ie7CSS.addRecalc("float", "left|right", function($element) { |
---|
29 | ie7Layout.boxSizing($element.parentElement); |
---|
30 | // "doubled margin" bug |
---|
31 | $element.runtimeStyle.display = "inline"; |
---|
32 | }); |
---|
33 | |
---|
34 | // "unscrollable content" bug |
---|
35 | // http://www.positioniseverything.net/explorer/unscrollable.html |
---|
36 | ie7CSS.addRecalc("position", "absolute|fixed", function($element) { |
---|
37 | if ($element.offsetParent && $element.offsetParent.currentStyle.position == "relative") |
---|
38 | ie7Layout.boxSizing($element.offsetParent); |
---|
39 | }); |
---|
40 | } |
---|
41 | |
---|
42 | //# // get rid of Microsoft's pesky image toolbar |
---|
43 | //# if (!complete) document.write('<meta http-equiv="imagetoolbar" content="no">'); |
---|
44 | |
---|
45 | }); |
---|