Side navigation
#7101 closed bug (fixed)
Opened September 30, 2010 02:23AM UTC
Closed September 30, 2010 06:26PM UTC
IE opacity setting
Reported by: | thomaspreu | Owned by: | snover |
---|---|---|---|
Priority: | high | Milestone: | 1.4.3 |
Component: | css | Version: | 1.4.2 |
Keywords: | opacity filter ie | Cc: | |
Blocked by: | Blocking: |
Description
When setting a opacity to a element in IE (e.g. through fadeTo()) all previously applied ms filters are lost.
Suggested solution
jquery-1.4.2.js line 4602 (jQuery.style)
style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
replace with:
style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : filter+' '+opacity;
This solution is not perfect because if a filter is modified by a script (e.g. obj.filters.item("DXImageTransform.Microsoft.Matrix").M11 = costheta;) those modification will be lost. However everything one can do thorough obj.filters is doable with search & replace & append to obj.style.filter as well.
I don't think there is a good solution which would preserve modifications done through obj.filters, the only way it would work is by querying obj.filters for all current values, building a style.filter string with all those found values in it and than apply to obj.style.filter but this is way to complicated to add to jQuery, I would guess 100 lines or more (prove me wrong!).
Duplicate of #4707.