TinyMCE错误 - INDEX_SIZE_ERR:DOM异常1

时间:2013-01-28 14:51:26

标签: javascript tinymce

我有一个使用TinyMCE的遗留内部系统,但它最近停止了工作,我无法弄清楚为什么所以我希望可能有一些用户可以提供帮助。

该系统是常见问题解答类型,在一页上有4个简单的初始文本,在提交时会更新数据库。

Chrome中的错误如下:

Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1在非编辑插件的editor_plugin.js中的第110行

r = s.getRangeAt(0);

另一个错误是

Uncaught TypeError: Cannot read property 'nodeName' of null位于表插件的editor_plugin.js的第1行。链接:http://www.tinymce.com/wiki.php/Plugin:table

奇怪的是,如果我点击页面上的第四个tinymce框然后更新内容并提交,数据库就会更新,这非常非常奇怪。

我知道继续下去很少,但问题更多的是希望而不是期望。

不可编辑插件的editor_plugin_src.js的最后一次提交是

editor_plugin_src.js,v 1.1 2010/12/15 14:00:33 amcpeake

我试着在github上查看这个文件的提交,但看不到任何解决这个bug的内容。

我尝试下载最新版本的tinymce,但这完全破坏了系统。

enter image description here

这是代码的完整分支,其中不可编辑的插件从上面提到的行中获取错误:

_moveSelection : function(e, inst) {
var s, r, sc, ec, el, c = tinyMCE.getParam('noneditable_editable_class', 'mceNonEditable');

    if (!inst)
        return true;

    // Always select whole element
    if (tinyMCE.isGecko) {
        s = inst.selection.getSel();
        r = s.getRangeAt(0);
        sc = tinyMCE.getParentNode(r.startContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});
        ec = tinyMCE.getParentNode(r.endContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});

        sc && r.setStartBefore(sc);
        ec && r.setEndAfter(ec);

        if (sc || ec) {
            if (e.type == 'keypress' && e.keyCode == 39) {
                el = sc || ec;

                // Try!!
            }

            s.removeAllRanges();
            s.addRange(r);

            return tinyMCE.cancelEvent(e);
        }
    }

    return true;
},

0 个答案:

没有答案