1

I'm using simplemodal 1.4.4 with jQuery 1.10.2 and am getting 'Not implemented' errors in IE8. This is due to simplemodal incorrectly detecting that IE is in quirks mode and executing the 'fixIE' function that is supposed to fix issues in IE6 and IE7 but errors in IE8 (and presumably IE9+ too).

simplemodal does the following check for ieQuirks:

browser.ieQuirks = browser.msie && !$.support.boxModel;

The problem is that $.support.boxModel has been removed from jQuery 1.10 so !$.support.boxModel is always returning true.

I'm wondering what the best way to detect quirks mode is in IE so I can replace !$.support.boxModel?

Ric
  • 405
  • 3
  • 12
  • 1
    just provide the boxModel value yourself before using the plugin – Endless Feb 12 '14 at 12:23
  • Or you could just replace that detection in the plugin’s code with a working one … http://stackoverflow.com/questions/627097/how-to-tell-if-a-browser-is-in-quirks-mode – CBroe Feb 12 '14 at 13:40

2 Answers2

2

Latest version of Simple Modal [1.4.4] uses $.support.boxModel, [Line 239] which is not supported from Jquery 1.10.*

To resolve this problem replace following line:

// Line 240: browser.ieQuirks = browser.msie && !$.support.boxModel;

with

browser.ieQuirks = browser.msie && (document.compatMode === "BackCompat");
Shaiekh
  • 86
  • 5
0

this is what jquery took away, you can insert it back in if you want to

var div = document.createElement("div");
div.style.width = div.style.paddingLeft = "1px";

document.body.appendChild( div );
jQuery.support.boxModel = div.offsetWidth === 2;
Endless
  • 34,080
  • 13
  • 108
  • 131