mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
bc9c6a32fb
commit
8bc42cd121
1 changed files with 2 additions and 1 deletions
|
|
@ -149,7 +149,8 @@ export const getEditorRange = (element: Element): Range => {
|
|||
}
|
||||
}
|
||||
// 移动端获取有偏差 https://github.com/siyuan-note/siyuan/issues/15998
|
||||
if (getContenteditableElement(range.startContainer as Element)) {
|
||||
if ((range.startContainer as Element).getAttribute("contenteditable") !== "true" &&
|
||||
getContenteditableElement(range.startContainer as Element)) {
|
||||
const blockElement = hasClosestBlock(range.startContainer);
|
||||
if (blockElement) {
|
||||
const focusRange = focusBlock(blockElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue