in partnership with mediatemple

Ticket #934 (new enhancement)

Opened 2 months ago

Last modified 2 days ago

Opacity totally rewrites filter on IE

Reported by: Devign Owned by:
Type: enhancement Priority: minor
Milestone: Mootools version 1.3 Component: Core
Keywords: Opacity, IE6, filter Cc:

Description

Element.Properties.opacity.set totally rewrites the filter, that way already written filters are removed (gray(), AlphaImageLoader?...)

this.style.filter = ...

Could it only edit the specific alpha filter?

Code example (none mooish) of how maintaining the other filters:

<script type="text/javascript">
var x;
onload=function () {
	x=document.getElementById("x");
	setTimeout(function () { setOpacity(30); },500);
	setTimeout(function () { setOpacity(80); },1000);
}
function setOpacity(i) {
	if (!x.filters.alpha) x.style.filter+="alpha(opacity="+i+")";
	else x.filters.alpha.opacity=i;
}
</script>

<div style="width:100px;height:100px;background-color:red;filter:gray()" id="x"></div>

Thanks.

Attachments

opacity_filter_fix.diff (1.4 kB) - added by tomocchino 4 days ago.

Change History

Changed 4 days ago by tomocchino

Changed 4 days ago by tomocchino

  • milestone changed from Mootools version 1.2 to Mootools version 1.3

this patch will be applied after the release of 1.2 when we can test it a little more

Changed 2 days ago by tomocchino

  • priority changed from major to minor
  • milestone set to Mootools version 1.3

Changed 2 days ago by tomocchino

  • type changed from defect to enhancement
Note: See TracTickets for help on using tickets.