Permalink
Browse files

Fix for ticket 1282

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;
    }
  • Loading branch information...
1 parent c13b1fc commit e6ff400d8cb563607bc9647d911c405416f05459 @victor-homyakov committed Nov 6, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/prototype/dom/dom.js
View
@@ -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;

0 comments on commit e6ff400

Please sign in to comment.