This commit is contained in:
Vanessa 2023-03-02 10:34:56 +08:00
parent b28e5678ad
commit e45f5998c1

View file

@ -210,7 +210,10 @@ export const getSelectionPosition = (nodeElement: Element, range?: Range) => {
}
} else {
const rects = range.getClientRects(); // 由于长度过长折行,光标在行首时有多个 rects https://github.com/siyuan-note/siyuan/issues/6156
cursorRect = rects[rects.length - 1];
return { // 选中多行不应遮挡第一行 https://github.com/siyuan-note/siyuan/issues/7541
left: rects[rects.length - 1].left,
top: rects[0].top
}
}
return {