操作系统:
WIN7
浏览器版本:
Opera 11.64
KindEditor版本:
4.12
BUG再现步骤:
1.$(".articletitle").live('click',function(){
var url=$(this).attr('href');
var id=$(this).parent("td").prev().children().val();
var area;
if($.browser.safari){area=['600px','490px'];
}else{
if($.browser.version>=9)
area=['600px','492px'];
else
area=['600px','525px'];
}
$.layer({ //弹出层插件
v_dom:"#addtable",
v_box:1,
v_title:"编辑菜单",
v_btns:0,
v_area:area,
v_offset:['3%','50%'],
v_shade:false
});
if(editor){
editor.remove('#editor');//opera报错如下
}
editor = KindEditor.create('#editor',{
height : "180px",
filterMode : false,
resizeType : 0,
shadowMode:true,
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link']
});
$.get(url,function(data){renderform(data,id,editor);});//ajax结束
return false;
});
/******************报错结果*****************************/
Event thread: click
Uncaught exception: TypeError: Cannot convert 'K(doc.body)' to object
Error thrown at line 3672, column 2 in <anonymous function: remove>() in http://../editor/kindeditor.js:
K(doc.body).unbind();
called from line 5036, column 2 in <anonymous function: remove>() in http://../editor/kindeditor.js:
self.edit.remove();
called from line 88, column 16 in <anonymous function>() in http://..Public/js/article.js:
editor.remove('#editor');
called via Function.prototype.apply() from line 3331, column 5 in <anonymous function: dispatch>(event) in http://localhost/ashim/Admin/Tpl/Public/js/jquery.js:
ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
called from line 2940, column 4 in <anonymous function: eventHandle>(e) in http://localhost/ashim/Admin/Tpl/Public/js/jquery.js:
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
/***********************************************************************/
bug表现为,我只能点击一次,成功弹出层,第二次因为错误,则无法成功的弹出层
期望结果: 解决我所述问题,我猜想是remove()与opero不兼容?