mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 17:31:43 +08:00
This commit is contained in:
parent
9945ad7a7a
commit
1e62853195
@ -128,6 +128,8 @@ export const initUI = (protyle: IProtyle) => {
|
|||||||
(!event.target.classList.contains("protyle-content") && !event.target.classList.contains("protyle-wysiwyg"))) {
|
(!event.target.classList.contains("protyle-content") && !event.target.classList.contains("protyle-wysiwyg"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 选中最后一个块末尾点击底部时,range 会有值,需等待
|
||||||
|
setTimeout(() => {
|
||||||
// 选中文本禁止添加空块 https://github.com/siyuan-note/siyuan/issues/13905
|
// 选中文本禁止添加空块 https://github.com/siyuan-note/siyuan/issues/13905
|
||||||
if (window.getSelection().rangeCount > 0) {
|
if (window.getSelection().rangeCount > 0) {
|
||||||
const currentRange = window.getSelection().getRangeAt(0);
|
const currentRange = window.getSelection().getRangeAt(0);
|
||||||
@ -170,6 +172,7 @@ export const initUI = (protyle: IProtyle) => {
|
|||||||
focusByRange(range);
|
focusByRange(range);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
let overAttr = false;
|
let overAttr = false;
|
||||||
protyle.element.addEventListener("mouseover", (event: KeyboardEvent & { target: HTMLElement }) => {
|
protyle.element.addEventListener("mouseover", (event: KeyboardEvent & { target: HTMLElement }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user