Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerCssHook can't handle 'none' #57

Closed
leongersen opened this issue Jul 10, 2012 · 2 comments
Closed

registerCssHook can't handle 'none' #57

leongersen opened this issue Jul 10, 2012 · 2 comments

Comments

@leongersen
Copy link

This also applies to issue#48.

When using the jQuery 1.8 beta, or Internet Explorer 10, the $(elem).css('transform') returns 'none' when the element has not been transformed using css. The || condition never hits, and setFromString won't work.

It isn't the cleanest fix; but it works nonetheless:

Change:

 var t = $(elem).css('transform') || new Transform();

Into:

if($(elem).css('transform')!=='none'){
    var t = $(elem).css('transform')  || new Transform();
} else {
    var t = new Transform();
}
@robwalch
Copy link

Yep! seeing this in Windows 8 Release Preview. Just forked the project to patch.

Does this happen by default, or only when your CSS specifies "none", for instance using a media query or javascript to attempt and remove the transform?

Should we be checking if the result is of type String?

var t = $(elem).css('transform');
 if (!t || typeof t === "string") {
  t = new Transform();
}

@rstacruz
Copy link
Owner

I believe v0.9.9 resolves this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants