2011-04-22 91 views
4

我在的fancybox弹出框中 这里把tinyMCE的时候的一个问题是代码整合的fancybox和tinyMCE的问题

$(document).ready(function() { 


     $(".reply_button").fancybox({ 
     'scrolling'  : 'no', 
     'titleShow'  : false, 
     'onClosed'  : function() { 
      $.fancybox.close(); 
      $("#login_error").hide(); 
     } 
     ,'onComplete': function(){ 
       $("textarea.editor").tinymce({ 
      script_url: "resources/scripts/tiny_mce", 
      mode: "textareas", 
      theme: "advanced", 

     }); 
     } 
    }); 

    }); 

问题是,当箱子打开,然后我关闭它,涵盖网页灰色层留下来,我必须刷新页面才能返回到网站。

,我有这样的错误跟踪在控制台

Error: uncaught exception: [Exception... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: ""

+0

有没有机会向我们展示jsFiddle或live链接? – 2011-04-22 22:13:46

+0

http://jsfiddle.net/pbGxq/3/ – 2011-04-22 23:12:14

+0

在Chrome 10.0.648.204中正常工作,显示您在Firefox 3和4中描述的错误。 – 2011-04-22 23:21:09

回答

3

看起来像TinyMCE的一个bug。我unpacked the script,它的死在线路7687(在if声明的两半扔错误,线缠绕这里阅读):

if (i.compareBoundaryPoints(i.START_TO_START, g.selectedRange) === 0 && 
    i.compareBoundaryPoints(i.END_TO_END, g.selectedRange) === 0) 

你可能想file a bug report,使用differenteditor,或两者都做。我自己并没有使用TinyMCE,但似乎有大量有关它的大小(臃肿)和错误(无数)的抱怨。

+0

+1分析 – Thariama 2011-04-26 13:46:39