Skip to content

Commit

Permalink
Fix for ticket 1282
Browse files Browse the repository at this point in the history
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
Victor Homyakov committed Nov 6, 2012
1 parent c13b1fc commit e6ff400
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/prototype/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6ff400

Please sign in to comment.