Vanessa 2025-04-16 18:58:31 +08:00
parent efda0fb161
commit 9889ef7fb2

View file

@ -644,7 +644,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
} else {
let focusHljs = false;
// 定位到末尾 https://github.com/siyuan-note/siyuan/issues/5982
if (cursorElement.parentElement.classList.contains("hljs")) {
if (element.getAttribute("data-type") === "NodeCodeBlock") {
// 代码块末尾定位需在 /n 之前 https://github.com/siyuan-note/siyuan/issues/9141https://github.com/siyuan-note/siyuan/issues/9189
let lastNode = cursorElement.lastChild;
if (!lastNode) {