Multiple instances of tinyMce not working in chrome
As of the title in Chrome (v.4.1) multiple tinyMce instances (v2.08) don't work. More precisely, the first two instances are ok, the others are not, and chrome is giving this error:
Uncorrectable error: INDEX_SIZE_ERR: DOM Exception 1
Has it happened before?
Unfortunately I can't show you any code because it is for the admin area, I just need a hint for now.
a source to share
Yes, as user XP1 pointed out, you can find the permission for the attached TinyMCE source from this link: http://my.opera.com/XP1/blog/2011/07/21/tinymce-javascript-error-in-opera-getrangeat -index-size-err
But if you want to work with the original unrelated source (it's a little easier), here is the solution: Look for the code "setRng: function (r) {" (without quotes) and swap the whole function with:
setRng : function(r) {
var s, t = this;
if (!t.tridentSel) {
s = t.getSel();
if (s) // this block fixed according to TinyMCE JavaScript error in Opera (getRangeAt, INDEX_SIZE_ERR); http://my.opera.com/XP1/blog/2011/07/21/tinymce-javascript-error-in-opera-getrangeat-index-size-err
{
if(s.anchorNode === null && s.focusNode === null)
{
t.explicitRange = r;
try {
s.removeAllRanges();
} catch (ex) {
// IE9 might throw errors here don't know why (NOW WE KNOW WHY DAMMIT!)
}
s.addRange(r);
}
if (s.rangeCount > 0)
t.selectedRange = s.getRangeAt(0);
}
} else {
// Is W3C Range
if (r.cloneRange) {
t.tridentSel.addRange(r);
return;
}
// Is IE specific range
try {
r.select();
} catch (ex) {
// Needed for some odd IE bug #1843306
}
}
},
ONE NOTE: please make sure the variables are the same. I'm not sure how it goes between different TinyMCE versions. But the variables do not match between the constimed and src variables of the script file.
Departure and speed of God
a source to share