#12537 closed bug (fixed)
element.css('filter') returns undefined in IE9
Reported by: | Owned by: | mikesherov | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.8.3 |
Component: | css | Version: | 1.8.0 |
Keywords: | Cc: | mikesherov | |
Blocked by: | Blocking: |
Description
The following returns undefined in Internet Explorer 9 (IE8 works fine) using jQuery 1.8+ but works in jQuery 1.7.
<style type="text/css"> div{ background-color:#F4F4F4; background:-webkit-gradient(linear,0% 100%,0% 0,from(#FFFFFF),to(#ECECEC)); background:-webkit-linear-gradient(top,#FFFFFF,#ECECEC); background:-moz-linear-gradient(top,#FFFFFF,#ECECEC); -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)";background:-ms-linear-gradient(top,#FFFFFF,#ECECEC);background:-o-linear-gradient(top,#FFFFFF,#ECECEC); height: 400px; } </style> <script type="text/javascript"> $(function(){ alert($('div').css('filter')); }); </script>
Change History (7)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Cc: | mikesherov added |
---|---|
Component: | unfiled → css |
Milestone: | None → 1.8.2 |
Priority: | undecided → blocker |
Status: | new → open |
Moar test case: http://jsfiddle.net/d5beX/5/
It seems that even though the CSS specifies -ms-filter
, the property in .css()
must be specified as filter
. Plus, it has to be grabbed via computed.getPropertyValue("filter")
and not computed["filter"]
. Not sure if we just need a cssHook for this one case or whether we should be using .getPropertyValue
everywhere.
Since this is a regression I'll mark it as 1.8.2 blocker but it may be pushed to 1.9.
comment:3 Changed 11 years ago by
Owner: | set to mikesherov |
---|---|
Status: | open → assigned |
Whatever ends up smaller. Thanks for the test case Dave.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #12537, element.css('filter') returns undefined in IE9. Close gh-942.
Changeset: 9ced0274653b8b17ceb6b0675e2ae05433dcf202
comment:6 Changed 11 years ago by
Milestone: | 1.8.2 → 1.9 |
---|
comment:7 Changed 11 years ago by
Milestone: | 1.9 → 1.8.3 |
---|
Here is the jsFiddle: http://jsfiddle.net/d5beX/