diff --git a/CHANGELOG b/CHANGELOG index 1970358..7b838e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* In IE, allow opacity to be set on elements not yet attached to the document. Closes #9904. [Thomas Fuchs, dcpedit, Tobie Langel] + * Avoid the try..catch block in Ajax.Response#_getResponseJSON unless required. [Tobie Langel] * Add more tests to Element.update. Closes #9327. [Tobie Langel] diff --git a/src/dom.js b/src/dom.js index ba86405..1512459 100644 --- a/src/dom.js +++ b/src/dom.js @@ -747,7 +747,11 @@ else if (Prototype.Browser.IE) { return filter.replace(/alpha\([^\)]*\)/gi,''); } element = $(element); - if (!element.currentStyle.hasLayout) element.style.zoom = 1; + var currentStyle = element.currentStyle; + if ((currentStyle && !currentStyle.hasLayout) || + (!currentStyle && element.style.zoom == 'normal')) + element.style.zoom = 1; + var filter = element.getStyle('filter'), style = element.style; if (value == 1 || value === '') { (filter = stripAlpha(filter)) ? diff --git a/test/unit/dom.html b/test/unit/dom.html index dc4f901..a484583 100644 --- a/test/unit/dom.html +++ b/test/unit/dom.html @@ -223,6 +223,8 @@