ChavezArquitectos / curvycorners

Automatically exported from code.google.com/p/curvycorners
0 stars 0 forks source link

Does not work in IE8 with filters (or in code forced compatability mode) #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Show a div with curves on 2 diaganal corners through css, an alpha 
filter and borders.
2. include curvycorners js

What is the expected output? What do you see instead?
Expect a dimmed div, but you get a dimmed div with some of the borders not 
dimmed.

What version of the product are you using? On what operating system?
2.0.4, XP

Please provide any additional information below.
It works in all other versions of IE.

I tried it in compatability mode but it only worked if the user presses 
the compatabilty mode button.  Setiing the meta data for compatability 
mode did not work becuase the browserdetect function does not treat it as 
IE7 when IE8 renders a page in emulateie7 mode.

Fixed the detect issue with the following browserdetect function:

function browserdetect() {
  var agent = navigator.userAgent.toLowerCase();
  this.isIE      = agent.indexOf("msie") > -1;
  this.ieVer = this.isIE ? /msie\s(\d\.\d)/.exec(agent)[1] : 0;
  if (this.ieVer > 7)
  {
    this.quirksMode = (document.documentMode == 5);
    this.ieVer = document.documentMode;
  }
  else
    this.quirksMode = this.isIE && (!document.compatMode || 
document.compatMode.indexOf("BackCompat")>-1);
  this.isMoz     = agent.indexOf('firefox') != -1;
  this.isSafari  = agent.indexOf('safari') != -1;
  this.isOp      = 'opera' in window;
  this.isWebKit  = agent.indexOf('webkit') != -1;
  if (this.isIE) {
    this.get_style = function(obj, prop) {
      if (!(prop in obj.currentStyle)) return "";
      var matches = /^([\d.]+)(\w*)/.exec(obj.currentStyle[prop]);
      if (!matches) return obj.currentStyle[prop];
      if (matches[1] == 0) return '0';
      // now convert to pixels if necessary
      if (matches[2] && matches[2] !== 'px') {
        var style = obj.style.left;
        var rtStyle = obj.runtimeStyle.left;
        obj.runtimeStyle.left = obj.currentStyle.left;
        obj.style.left = matches[1] + matches[2];
        matches[0] = obj.style.pixelLeft;
        obj.style.left = style;
        obj.runtimeStyle.left = rtStyle;
      }
      return matches[0];
    };
  }
  else {
    this.get_style = function(obj, prop) {
      prop = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
      return document.defaultView.getComputedStyle
(obj, '').getPropertyValue(prop);
    };
  }
}

now it works fine in IE8 with the metadata set to use ie7 rendering but 
still the ie8 issue remains.

Smiley

Original issue reported on code.google.com by smi...@ezylearn.net on 30 Jul 2009 at 2:25

GoogleCodeExporter commented 8 years ago

Original comment by c.1%smit...@gtempaccount.com on 9 Aug 2009 at 1:35

GoogleCodeExporter commented 8 years ago
Fixed in r137, 2.0.5pre10.

Original comment by c.1%smit...@gtempaccount.com on 11 Aug 2009 at 3:16