PDA

View Full Version : Menu shadow probolem in IE9



bywayboy
4 Mar 2011, 10:29 PM
createContextualFragment

Script Error At DomHelper
file:ext-all-debug.js
line:508
frag = range.createContextualFragment(html);


method createContextualFragment not support!

NoahK17
10 Mar 2011, 9:06 AM
Same issue. Anyone have an idea?

NoahK17
10 Mar 2011, 9:51 AM
Solved:

createContextualFragment is not supported in IE9.

Add this code somewhere:


if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment)
{
Range.prototype.createContextualFragment = function(html)
{
var frag = document.createDocumentFragment(),
div = document.createElement("div");
frag.appendChild(div);
div.outerHTML = html;
return frag;
};
}

Jonny5
13 Jul 2011, 1:23 PM
That seems to do the trick.