修复kindEditor点击加粗, 内容焦点跳动的问题

大概1560~1569行

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;
  x = pos.x;//修复加粗动作时滚动条左右跳动
  // y = box.top + pos.y;
  y = pos.y;//修复加粗动作时滚动条上下跳动
} else {
  while (node) {
  x += node.offsetLeft;
  y += node.offsetTop;
  node = node.offsetParent;
  }
}

}

posted @ 2018-12-26 20:33  荒野猛兽  阅读(461)  评论(0编辑  收藏  举报