您的位置:首页 > 其它

kindeditor编辑器点击图片置顶bug修改方法

2016-09-12 11:37 351 查看
修改文件

editor/kindeditor.js

editor/kindeditor-all.js

修改代码

pos : function() {
var self = this, node = self[0], x = 0, y = 0;
if (node) {
if (node.getBoundingClientRect) {
var box = node.getBoundingClientRect(),
pos = _getScrollPos(self.doc);
x = box.left + pos.x;
y = box.top + pos.y;
} else {
while (node) {
x += node.offsetLeft;
//源代码 y += node.offsetTop;
y = (parseInt(box.top) < 0 ? 0 : box.top) +pos.y;//修改后
node = node.offsetParent;
}
}
}
return {x : _round(x), y : _round(y)};
},


问题解决!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  编辑器