Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-14 01:17:59 +08:00
parent bc9c6a32fb
commit 8bc42cd121
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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);