mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
b260d7447a
commit
e38d9baf61
1 changed files with 16 additions and 8 deletions
|
|
@ -136,6 +136,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
} else {
|
} else {
|
||||||
nextElement = currentSelectElement;
|
nextElement = currentSelectElement;
|
||||||
}
|
}
|
||||||
|
} else if (nextElement.getAttribute("fold") === "1"
|
||||||
|
&& (nextElement.classList.contains("sb") || nextElement.classList.contains("bq"))) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/3913
|
||||||
} else {
|
} else {
|
||||||
nextElement = getFirstBlock(nextElement) as HTMLElement;
|
nextElement = getFirstBlock(nextElement) as HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
@ -153,6 +156,10 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
} else if (event.key === "ArrowUp") {
|
} else if (event.key === "ArrowUp") {
|
||||||
let previousElement: HTMLElement = getPreviousBlock(selectElements[0]) as HTMLElement;
|
let previousElement: HTMLElement = getPreviousBlock(selectElements[0]) as HTMLElement;
|
||||||
if (previousElement) {
|
if (previousElement) {
|
||||||
|
if (previousElement.getAttribute("fold") === "1"
|
||||||
|
&& (previousElement.classList.contains("sb") || previousElement.classList.contains("bq"))) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/3913
|
||||||
|
} else {
|
||||||
previousElement = getLastBlock(previousElement) as HTMLElement;
|
previousElement = getLastBlock(previousElement) as HTMLElement;
|
||||||
if (previousElement.getBoundingClientRect().width === 0) {
|
if (previousElement.getBoundingClientRect().width === 0) {
|
||||||
// https://github.com/siyuan-note/siyuan/issues/4294
|
// https://github.com/siyuan-note/siyuan/issues/4294
|
||||||
|
|
@ -163,6 +170,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
previousElement = selectElements[0] as HTMLElement;
|
previousElement = selectElements[0] as HTMLElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (protyle.title && (protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "true" ||
|
} else if (protyle.title && (protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "true" ||
|
||||||
protyle.contentElement.scrollTop === 0)) {
|
protyle.contentElement.scrollTop === 0)) {
|
||||||
protyle.title.editElement.focus();
|
protyle.title.editElement.focus();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue