Opened 7 years ago

Closed 4 years ago

#16990 closed defect (patchwelcome)

dom-style: Resetting opacity in ie8 actually set opacity to 0

Reported by: vincent.noel Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: HTML Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

as simple as :

console.log('before setting opacity', node.style.filter) domStyle.set(node, "opacity", ""); console.log('after setting opacity', node.style.filter)

displays: before setting opacity after setting opacity progidXImageTransform.Microsoft.Alpha(Opacity=0)

in dom-style.js line 155 of 1.8.0:

var ov = opacity * 100, opaque = opacity == 1;
	node.style.zoom = opaque ? "" : 1;

	if(!af(node)){
		if(opaque){
			return opacity;
		}
		node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
	}else{
		af(node, 1).Opacity = ov;
	}

opacity * 100, when opacity is equal to empty string equals 0, ("" * 100 === 0)

I checked the code in 1.8.3 and the code look exactly the same.

Change History (3)

comment:1 in reply to:  description Changed 7 years ago by vincent.noel

Better with code formating.

console.log('before setting opacity', node.style.filter);
domStyle.set(node, "opacity", "");
console.log('after setting opacity', node.style.filter);

displays:

before setting opacity 
after setting opacity progidXImageTransform.Microsoft.Alpha(Opacity=0)
Last edited 7 years ago by vincent.noel (previous) (diff)

comment:2 Changed 7 years ago by bill

Component: GeneralHTML
Owner: set to Eugene Lazutkin

comment:3 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.