This commit is contained in:
Vanessa 2024-03-04 23:54:31 +08:00
parent 4545cb11fe
commit c2383a6682

View file

@ -877,7 +877,11 @@ export class WYSIWYG {
let firstBlockElement = hasClosestBlock(firstElement);
if (moveEvent.clientY > y) {
if (!startFirstElement) {
startFirstElement = firstElement;
// 向上选择导致滚动条滚动到顶部再向下选择至 > y 时firstBlockElement 为 undefined https://ld246.com/article/1705233964097
if (!firstBlockElement) {
firstBlockElement = protyle.wysiwyg.element.firstElementChild as HTMLElement;
}
startFirstElement = firstBlockElement;
}
} else if (!firstBlockElement &&
// https://github.com/siyuan-note/siyuan/issues/7580