mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 23:44:06 +01:00
🎨 改进 划选
This commit is contained in:
parent
6e8a4bbf71
commit
d033e9a7be
1 changed files with 8 additions and 7 deletions
|
|
@ -571,15 +571,16 @@ export class WYSIWYG {
|
|||
if (firstElement.classList.contains("protyle-wysiwyg") || firstElement.classList.contains("list") || firstElement.classList.contains("sb") || firstElement.classList.contains("bq")) {
|
||||
firstElement = document.elementFromPoint(newLeft - 1, newTop + 16);
|
||||
}
|
||||
if (!firstElement || firstElement.classList.contains("protyle-wysiwyg")) {
|
||||
if (!firstElement) {
|
||||
return;
|
||||
}
|
||||
if (moveEvent.clientY > y && !startFirstElement) {
|
||||
startFirstElement = firstElement;
|
||||
}
|
||||
const firstBlockElement = hasClosestBlock(firstElement);
|
||||
if (!firstBlockElement) {
|
||||
return;
|
||||
let firstBlockElement = hasClosestBlock(firstElement);
|
||||
if (moveEvent.clientY > y) {
|
||||
if (!startFirstElement) {
|
||||
startFirstElement = firstElement;
|
||||
}
|
||||
} else if (!firstBlockElement) {
|
||||
firstBlockElement = protyle.wysiwyg.element.firstElementChild as HTMLElement;
|
||||
}
|
||||
let selectElements: Element[] = [];
|
||||
let currentElement: Element | boolean = firstBlockElement;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue