mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 10:11:26 +08:00
This commit is contained in:
parent
8ece62c075
commit
4e13146e5e
@ -329,7 +329,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
||||
if (isNotCtrl(event) && event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
||||
const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");
|
||||
if (selectElements.length > 0) {
|
||||
event.stopPropagation();
|
||||
@ -704,7 +704,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
} else {
|
||||
// 修正光标上移至 \n 结尾的块时落点错误 https://github.com/siyuan-note/siyuan/issues/14443
|
||||
const prevEditableElement = getContenteditableElement(previousElement) as HTMLElement;
|
||||
if (prevEditableElement && prevEditableElement.lastChild.nodeType === 3 &&
|
||||
if (prevEditableElement && prevEditableElement.lastChild.nodeType === 3 &&
|
||||
prevEditableElement.lastChild.textContent.endsWith("\n")) {
|
||||
prevEditableElement.lastChild.textContent = prevEditableElement.lastChild.textContent.replace(/\n$/, "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user