Question

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?

Was it helpful?

Solution

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");

OTHER TIPS

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;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top