zoltan-dulac / cssSandpaper

a CSS3 Polyfill that implements CSS3 transforms, box-shadow, gradients, opacity and RGBA/HSL/HSLA colours in browser that don't support them.
http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/
208 stars 47 forks source link

Can't get it working in IE7-8 #1

Open tmikaeld opened 13 years ago

tmikaeld commented 13 years ago

Hello,

Im testing this on IE9 and it works great there, but on IE7 and IE8 i get this error.

Message: 'undefined' is null or not an object Line: 147 Char: 9 Code: 0 URI: http://localserver/Tools/zoltan-dulac-cssSandpaper-c60921f/shared/js/asamuzak.jp/textshadow.js

And no text-shadow's are working.

zoltan-dulac commented 12 years ago

Do you have a test page that you can post with this error present?

wuservices commented 12 years ago

Are you trying to transform something that you haven't inserted into the DOM yet? I didn't have this exact issue but I noticed that due to the way some of the operations work (specifically, the legacy IE workarounds that add a parent container around the element), you the object you're using cssSandpaper on needs to have a parent.

In my case, I was trying to rotate an image that was in a Backbone.js view that wasn't inserted into the DOM yet and was getting an error. To fix it I just wrapped the img in a div before calling setTransform on it.

peterdemaeyer commented 12 years ago

I ran into the same issue with IE8, and I was able to fix it (or at least work around it).

To fix, overwriting the file shared/js/asamuzak.jp/textshadow.js with shared/js/textshadow.js.

I diffed both files and there is only a minor diff, but I'm no expert on JavaScript so what do I know... It worked, didn't it?

peterdemaeyer commented 12 years ago

Use the test pages in tests/cssSandpaper/textShadow* to reproduce/validate.

AlexanderSk commented 12 years ago

This seems to work: To fix, overwriting the file shared/js/asamuzak.jp/textshadow.js with shared/js/textshadow.js. Thank you very much peter!

The file "textShadowCss3Info.html" needs to change the text shadow path to src="../../shared/js/textshadow.js"

JDW1 commented 11 years ago

I get a similar error in IE7.

Here's my test page:

http://visionsecurity.jp/en/test/about.html

View the page's Source and you'll see that only "BodyText" has "text-shadow" applied to it.

Here's the content of the error dialog in IE7 (WindowsXP):

Message: 'selector' is null or not an object Line: 201 Char: 5 Code: 0 URI: http://visionsecurity.jp/en/test/about.html

I've tried everything I can think of to resolve this. Hosting the *.js files on my own server did not solve the problem, nor does it work when I hotlink them (temporarily of course) from useragentman.com.