robnyman / domassistant

Automatically exported from code.google.com/p/domassistant
1 stars 0 forks source link

Incorrect value from getStyle("opacity") in IE when opacity is 0 #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set opacity to 0 on an element:
#test {
    opacity: 0;
    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
}
2. Try to get it back using getStyle:
alert($$("test").getStyle("opacity"));

What is the expected output? 
0

What do you see instead?
1

What version of the product are you using? On what operating system?
DOMAssistant 2.7.4
IE 7

Please provide any additional information below.
The error is in this line (row 997):
val = (alpha.opacity || 100) / 100;

The check for the opacity properties fails since its value is 0.
Suggested solution could be something like this:
val = (typeof alpha.opacity !== "undefined" ? alpha.opacity : 100) / 100;

Original issue reported on code.google.com by gustaf.f...@gtempaccount.com on 16 Apr 2009 at 4:40

GoogleCodeExporter commented 9 years ago
This has recently been encountered and will be fixed. Thanks!

Original comment by chengh...@gmail.com on 16 Apr 2009 at 5:42

GoogleCodeExporter commented 9 years ago
Check SVN for fixed version.

Original comment by chengh...@gmail.com on 18 Apr 2009 at 5:14