When Cute Editor is in a frameset using IE 7 it fails with the following error:
'Unspecified Error' Then
'Object doesn't support this property or method'
This has been happening since we upgraded to 6.3 and is a very critical issue for us.
A test case is attached at
/forum_uploads2/CuteEditError.zip.
This is caused when:
1. The editor is in a frameset
2. The document has never been focused (editdoc.selection.type === "None")
3. editdoc.selection.createRange() is called.
The
partial fix:
File=IE_Implementation\CuteEditorImplementation.js
function Ox8ea() // Wrap the createRange in this function like this:
if (Ox8a6 !== "None") {
var Oxa = editdoc.selection.createRange();
}
function Ox9b3() // Wrap the createRange in this function like this:
function Ox9b3() {
var Ox12f = editdoc.selection;
if (Ox12f.type != "None") {
var Oxa = Ox12f.createRange();
var p;
if (Ox12f.type == 'Control') {
p = Oxa.item(0);
} else {
p = Oxa.parentElement();
}
if (p != editdoc.body &&
!editdoc.body.contains(p)) {
return false;
}
}
return true;
}
function Window_GetSelectionBookmark(Ox1b5) // Change this function as follows:
function Window_GetSelectionBookmark(Ox1b5) {
var Ox12f = Ox1b5.document.selection;
if (Ox12f.type. == 'Control') {
var arr = Window_GetSelectedControls(Ox1b5);
for (var i = 0; i < arr.length; i++) {
arr
= Window_GetSelectionBookmark_GetControlPosition(arr
);
}
return {type: 'Control', controls: arr};
} else {
var Ox6b0 = {type: 'Text', bookmark: null};
if (Ox12f.type !== "None") {
var Ox1a2 = Ox12f.createRange();
try {
Ox6b0.bookmark = Ox1a2.getBookmark();
} catch (x) {
}
try {
if (Ox1a2.text == '') {
var Ox14a = Ox1a2.parentElement();
if (Ox14a.nodeName != 'BODY') {
var Ox98a = Window_GetSelectionBookmark_GetControlPosition(Ox14a);
var Ox6bc = Ox1a2.duplicate();
Ox6bc.moveToElementText(Ox14a);
var len = Ox6bc.text.length;
Ox6bc.setEndPoint('EndToEnd', Ox1a2);
if (len == Ox6bc.text.length) {
Ox6b0.nodeposition = Ox98a;
}
}
}
} catch (x) {
Ox6b0.nodeerror = x;
}
}
return Ox6b0;
}
}
Thanks
Flintstone