Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for ticket 1282 #83

Open
wants to merge 1 commit into from

1 participant

@victor-homyakov

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;
  }
@victor-homyakov victor-homyakov 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;
    }
e6ff400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 6, 2012
  1. @victor-homyakov

    Fix for ticket 1282

    victor-homyakov authored
    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;
        }
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/prototype/dom/dom.js
View
5 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;
Something went wrong with that request. Please try again.