Skip to content

Commit

Permalink
fixes heygrady#8 in IE7 and below. IE 8 and IE9 operate in a weird re…
Browse files Browse the repository at this point in the history
…ndering mode when a transitional doctype is declared and the normal hasLayout hacks no longer apply to those browsers.
  • Loading branch information
heygrady committed May 4, 2012
1 parent 14fb216 commit 3ea009e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions jquery.textshadow.css
Expand Up @@ -12,6 +12,7 @@
/* default positioning */
left: 0;
top: 0;
zoom: 1; /* fixes #8 in IE7 and below */

/* turn off shadow */
text-shadow: none;
Expand Down
8 changes: 4 additions & 4 deletions jquery.textshadow.js
Expand Up @@ -147,16 +147,16 @@
if (!text.length) { // IE 9
return null;
}
var shadow = shadowNode.cloneNode(),
orig = origNode.cloneNode(),
copy = copyNode.cloneNode();
var shadow = shadowNode.cloneNode(false),
orig = origNode.cloneNode(false),
copy = copyNode.cloneNode(false);

shadow.appendChild(copy);
shadow.appendChild(orig);
//shadow.appendChild(document.createTextNode(" ")); // fixes #8

orig.appendChild(document.createTextNode(text));
copy.appendChild(document.createTextNode(text));

return shadow;
}

Expand Down

0 comments on commit 3ea009e

Please sign in to comment.