ueditor1.4.3 在IE8下的 BUG

ueditor1.4.3  .net 版 在IE8 下,多图片上传完成后,点击确认时报错,无法插入图片到编辑器中

 

原因是 ueditor.all.js 中的 24835 行

if (whitList[tagName].indexOf(key) === -1) {
                node.setAttr(key);
            }

判断报错,IE8 不支持这样的写法,

复制代码
var _index = -1;
            for (var i = 0; i < whitList[tagName].length ; i++) {
                if (whitList[tagName][i] == key)
                {
                    _index = i;
                    break;
                }
            }
            if (_index === -1) {
                node.setAttr(key);
            }
复制代码

 或者

if($.inArray(key, whitList[tagName])==-1){
    node.setAttr(key);
}

 

posted on 2020-06-27 09:21  剩余价值  阅读(162)  评论(0编辑  收藏  举报

导航