You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getOpacity malfunctions with IE 9 by not setting it properly because it is retrieved as a string. The reason for this is getStyle is overwritten with this:
if ('styleFloat' in DIV.style) { methods.getStyle = getStyle_IE; methods.setOpacity = setOpacity_IE; methods.getOpacity = getOpacity_IE; }
Here's the trace of what happens to trigger this bug:
Element.getOpacity(element);
Element.getStyle(element, 'opacity'); <- overwritten
Element.getStyle_IE(element, 'opacity');
return $value; <- getOpacity_IE is not called because standard opacity is supported
I have enclosed a patch which will fix this problem. This ensures that when getOpacity_IE gets called and the standard opacity call is supported, it will actually call the standard call instead of using the overwritten one.
diff --git a/src/prototype/dom/dom.js b/src/prototype/dom/dom.js
index f14639b..b456875 100644
--- a/src/prototype/dom/dom.js+++ b/src/prototype/dom/dom.js@@ -2847,6 +2847,10 @@
*
**/
function getStyle(element, style) {
+ return getDomStyle(element, style);+ }++ function getDomStyle(element, style) {
element = $(element);
style = normalizeStyleName(style);
@@ -2989,7 +2993,7 @@
* Returns the opacity of the element.
**/
function getOpacity(element) {
- return Element.getStyle(element, 'opacity');+ return getDomStyle(element, 'opacity');
}
function getOpacity_IE(element) {
The text was updated successfully, but these errors were encountered:
previous lighthouse ticket #1671
by Matthew Schultz
getOpacity malfunctions with IE 9 by not setting it properly because it is retrieved as a string. The reason for this is getStyle is overwritten with this:
if ('styleFloat' in DIV.style) { methods.getStyle = getStyle_IE; methods.setOpacity = setOpacity_IE; methods.getOpacity = getOpacity_IE; }
Here's the trace of what happens to trigger this bug:
Element.getOpacity(element);
Element.getStyle(element, 'opacity'); <- overwritten
Element.getStyle_IE(element, 'opacity');
return $value; <- getOpacity_IE is not called because standard opacity is supported
I have enclosed a patch which will fix this problem. This ensures that when getOpacity_IE gets called and the standard opacity call is supported, it will actually call the standard call instead of using the overwritten one.
The text was updated successfully, but these errors were encountered: