Issue with elrte in jQuery dialog in Internet Explorer 6,7,8 but not 9
Added by Paul Shipman 6 months ago
Hi,
I'm wondering if anyone's experienced this before and knows how to resolve the issue. I am calling elrte on a dialog after the dialog is exposed. It is working fine in Firefox, Chrome, Safari, Opera and Internet Explorer 9. It does not work in IE 6/7/8. The error it is throwing (when using elrte.full.js) is:
Line: 5983
Error: 'nodeType' is null or not an object
The code I am using to launch the rte is as follows:
var rte = $("#official_evaluations_comments");
//-------------------------------------------------------------------
//
//-------------------------------------------------------------------
function apply_rte(){
if(!rte.hasClass("elrte")){
//-------------------------------------------------------------------
//RTE
//-------------------------------------------------------------------
rte.addClass("elrte").elrte({
cssClass : 'el-rte',
doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">',
// lang : 'ru',
width: 500,
height: 200,
toolbar : 'tinyToolbar',
styleWithCSS : true
});
//-------------------------------------------------------------------
}
}
//-------------------------------------------------------------------
which is called by:
//-----------------------------------------------------------------------
$("#add_eval").click(function(event){
if($('form#official_evaluations input#evaluation_id').length){
$('form#official_evaluations#evaluation_id').remove();
}
$('form#official_evaluations').resetForm();
$('input#official_evaluations_form_type').val("add");
$('input#official_evaluations_go').val("Add");
$('select#official_evaluations_recommended_level_table_id').empty().append(force_cascade($("#official_evaluations_role_id").val(), official_evaluations_recommended_level_table_id));
$('#official_evaluations').show().parent().dialog({
width: 800,
modal: true,
focus: function(event, ui){
apply_rte();
}
});
event.preventDefault();
event.stopPropagation();
});
//-----------------------------------------------------------------------
Replies (4)
RE: Issue with elrte in jQuery dialog in Internet Explorer 6,7,8 but not 9
-
Added by Troex Nevelin 6 months ago
IE have problems creating something on a node if it is empty, try adding something to your rte node like <p>test</p>
RE: Issue with elrte in jQuery dialog in Internet Explorer 6,7,8 but not 9
-
Added by Paul Shipman 6 months ago
Interesting, I'll try that. So basically, I should ensure that my textarea does not have a null value?
RE: Issue with elrte in jQuery dialog in Internet Explorer 6,7,8 but not 9
-
Added by Troex Nevelin 6 months ago
Looks like the same issue here #786, please feedback if you find a solution
RE: Issue with elrte in jQuery dialog in Internet Explorer 6,7,8 but not 9
-
Added by Paul Shipman 5 months ago
Hi Troex,
Yes, I can confirm that ensuring there is html in the textarea before applying elrte resolves the issue.
Interesting point: loading <p></p> when the textarea is empty works, but <span></span> or does not.
(1-4/4)