From e6ff400d8cb563607bc9647d911c405416f05459 Mon Sep 17 00:00:00 2001 From: Victor Homyakov Date: Tue, 6 Nov 2012 17:43:07 +0300 Subject: [PATCH] Fix for ticket 1282 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attempt to fix https://prototype.lighthouseapp.com/projects/8886/tickets/1282-latest-prototypejs-from-github-repo-fails-in-opera Opera (at least 11.X) has false positive result in feature test `'styleFloat' in DIV.style`, but should have its own `getStyle_Opera` and standard `setOpacity`/`getOpacity`. Another variant:     if (Prototype.Browser.Opera) {       // Opera also has 'styleFloat' in DIV.style       methods.getStyle = getStyle_Opera;     } else if ('styleFloat' in DIV.style) {       methods.getStyle = getStyle_IE;     }     if (!STANDARD_CSS_OPACITY_SUPPORTED) {       methods.setOpacity = setOpacity_IE;       methods.getOpacity = getOpacity_IE;     } --- src/prototype/dom/dom.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/prototype/dom/dom.js b/src/prototype/dom/dom.js index ea6fc1332..19523b1a8 100644 --- a/src/prototype/dom/dom.js +++ b/src/prototype/dom/dom.js @@ -3012,7 +3012,10 @@ getOpacity: getOpacity }); - if ('styleFloat' in DIV.style) { + if (Prototype.Browser.Opera) { + // Opera also has 'styleFloat' in DIV.style + methods.getStyle = getStyle_Opera; + } else if ('styleFloat' in DIV.style) { methods.getStyle = getStyle_IE; methods.setOpacity = setOpacity_IE; methods.getOpacity = getOpacity_IE;