Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17567

Vanessa31aedcba3b4f
diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss
index da4a7bdc23..990a903ac2 100644
--- a/app/src/assets/scss/component/_typography.scss
+++ b/app/src/assets/scss/component/_typography.scss
@@ -78,6 +78,7 @@
&:after {
content: '‎';
}
+
// https://github.com/siyuan-note/siyuan/issues/3081 test $\begin{bmatrix} a & b \\c & d \\ e & f\end{bmatrix}$ test
// https://ld246.com/article/1626937851892 <u>test $\mu_p$ test</u>
// https://ld246.com/article/1636204769623 test $\rightarrow$ test
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 5cfdd05a2b..af9066be0b 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -716,7 +716,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
// 末尾按向下/右箭头丢失焦点 https://ld246.com/article/1629954026096
const lastEditElement = getContenteditableElement(nodeElement);
// 代码块需替换最后一个 /n https://github.com/siyuan-note/siyuan/issues/3221
- if (lastEditElement && !lastEditElement.querySelector(".emoji") &&
+ if (lastEditElement && !nodeElement.classList.contains("table") &&
+ !lastEditElement.querySelector(".emoji") &&
lastEditElement.textContent.replace(/\n$/, "").length <= getSelectionOffset(lastEditElement, undefined, range).end) {
event.stopPropagation();
event.preventDefault();
@@ -725,7 +726,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
} else if (selectText === "" && event.key === "ArrowLeft" && nodeElement === getFirstBlock(protyle.wysiwyg.element.firstElementChild)) {
// 页面向左箭头丢失焦点 https://github.com/siyuan-note/siyuan/issues/2768
const firstEditElement = getContenteditableElement(nodeElement);
- if (firstEditElement && getSelectionOffset(firstEditElement, undefined, range).start === 0) {
+ if (firstEditElement && !nodeElement.classList.contains("table") &&
+ getSelectionOffset(firstEditElement, undefined, range).start === 0) {
event.stopPropagation();
event.preventDefault();
focusByRange(range);