diff --git a/CHANGELOG b/CHANGELOG index bd3235c..f3e18b8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make setStyle() with opacity: 0 in Internet Explorer work correctly. [Thomas Fuchs] + * Form.Element.activate shouldn't raise an exception when the form or field is hidden. [sam] * Remove support for "throw $continue" in Enumerable. Use "return" instead. [sam] diff --git a/src/dom.js b/src/dom.js index c55a2df..c8332bb 100644 --- a/src/dom.js +++ b/src/dom.js @@ -333,7 +333,7 @@ Element.Methods = { !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; if(/MSIE/.test(navigator.userAgent) && !window.opera) element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); - } else if(value == '') { + } else if(value === '') { if(/MSIE/.test(navigator.userAgent) && !window.opera) element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); } else { diff --git a/test/unit/dom.html b/test/unit/dom.html index 5c73682..4850e09 100644 --- a/test/unit/dom.html +++ b/test/unit/dom.html @@ -610,9 +610,11 @@ $('style_test_3').setStyle({ opacity: 0.5 }); assertEqual(0.5, $('style_test_3').getStyle('opacity')); - // should remove opacity $('style_test_3').setStyle({ opacity: '' }); assertEqual(1, $('style_test_3').getStyle('opacity')); + + $('style_test_3').setStyle({ opacity: 0 }); + assertEqual(0, $('style_test_3').getStyle('opacity')); }}, testElementGetStyle: function() { with(this) {