Skip to main content

Bug Tracker

Side navigation

#9572 closed bug (fixed)

Opened June 13, 2011 12:54PM UTC

Closed August 17, 2011 09:31PM UTC

Last modified March 09, 2012 05:18AM UTC

jQuery 1.6.1 doesn't support -ms-transform in .css() method

Reported by: Wei Lou Owned by: dmethvin
Priority: low Milestone: 1.6.3
Component: css Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Reproducing the bug by running codes below on IE9:

<!DOCTYPE html>
<meta charset="utf-8">
<title>An HTML5 Document</title>
	p {
<p>This is a jQuery 1.6.1 bug.
<script src=""></script>
	// Fail to work
	$('p').css('-ms-transform', 'scale(1)');
	// Work OK
	// $('p').css('msTransform', 'scale(1)');

jQuery 1.6.1 doesn't support -ms-transform in .css() method. But jQuery should support.

Attachments (0)
Change History (8)

Changed June 13, 2011 02:23PM UTC by timmywil comment:1

component: unfiledcss
priority: undecidedlow
status: newopen

Neither works for me. This might be worth looking into, just so cssHooks and manual settings can do this without interference:

Changed June 13, 2011 08:46PM UTC by dmethvin comment:2

This is because Microsoft screwed up their interpretation of vendor prefixes. -ms-transform should map to MsTransform but instead it maps to msTransform. So to work around it we need to add .replace(/^-ms-/, "ms-") to prevent the initial caps. Of course that potentially screws up the use of .camelCase in non-css contexts...(shakes fist)

Changed June 14, 2011 08:09AM UTC by Wei Lou comment:3

I find a new similar bug in jQuery 1.6.1. That is $('p').css('mozTransform', 'scale(1)'); does work on Firefox 4.0.1. And $('p').css('-moz-transform', 'scale(1)'); works well. See codes:

Changed July 12, 2011 08:11PM UTC by timmywil comment:4

milestone: 1.next1.7

Confirmed in bug triage. I think we can get this into 1.7.

Changed August 15, 2011 04:10PM UTC by john comment:5

owner: → dmethvin
status: openassigned

Changed August 15, 2011 05:04PM UTC by dmethvin comment:6

$('p').css('mozTransform', 'scale(1)'); does work on Firefox 4.0.1

That's because it should be:

   $('p').css('MozTransform', 'scale(1)')

The leading dash on the vendor prefix means that the first letter *should* be capitalized. The bug is that Microsoft's -ms- prefix does not map to Ms but instead to ms.

Changed August 17, 2011 09:31PM UTC by timmywil comment:7

resolution: → fixed
status: assignedclosed

Landing pull request 463. Fixes #9572. Don't camelize the -ms- prefix because Microsoft didn't. A Fixes #9572.

More Details:

Changeset: 693870e04e1cccf972955dc14d59d8b98ca31ca7

Changed August 17, 2011 09:34PM UTC by dmethvin comment:8

Landing pull request 463. Fixes #9572. Don't camelize the -ms- prefix because Microsoft didn't. A Fixes #9572.

More Details:

Changeset: 1a738cb72fa9f8b7280f15586a68ef9377b18976