mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
2ed6bc0de7
commit
b50789fa3a
1 changed files with 13 additions and 5 deletions
|
@ -51,11 +51,19 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal
|
||||||
brElement.remove();
|
brElement.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// undo 时禁止数据库滚动
|
|
||||||
if (blockElement.classList.contains("av") && blockElement.dataset.render === "true" && (
|
if (blockElement.classList.contains("av") && blockElement.dataset.render === "true") {
|
||||||
blockElement.querySelector(".av__row--header")?.getAttribute("style")?.indexOf("transform") > -1 ||
|
// undo 时禁止数据库滚动
|
||||||
blockElement.querySelector(".av__row--footer")?.getAttribute("style")?.indexOf("transform") > -1
|
if (blockElement.querySelector(".av__row--header")?.getAttribute("style")?.indexOf("transform") > -1 ||
|
||||||
)) {
|
blockElement.querySelector(".av__row--footer")?.getAttribute("style")?.indexOf("transform") > -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const activeElement = blockElement.querySelector(".av__cell--select, .av__row--select, .av__gallery-item--select");
|
||||||
|
if (activeElement) {
|
||||||
|
activeElement.scrollIntoView({block: "nearest", behavior});
|
||||||
|
} else {
|
||||||
|
blockElement.scrollIntoView({block: "nearest", behavior});
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 撤销时 br 插入删除会导致 rang 被修改 https://github.com/siyuan-note/siyuan/issues/12679
|
// 撤销时 br 插入删除会导致 rang 被修改 https://github.com/siyuan-note/siyuan/issues/12679
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue