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/17014

Vanessa644ed904532a
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss
index 07e11ab629..b277e9b176 100644
--- a/app/src/assets/scss/business/_av.scss
+++ b/app/src/assets/scss/business/_av.scss
@@ -97,8 +97,13 @@
.b3-text-field {
transition: var(--b3-width-transition);
- overflow-x: hidden;
outline: none;
+ white-space: nowrap;
+ overflow: auto;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
}
}
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 270c41763b..513774e8da 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -2388,7 +2388,7 @@ export class WYSIWYG {
this.element.addEventListener("paste", (event: ClipboardEvent & { target: HTMLElement }) => {
// https://github.com/siyuan-note/siyuan/issues/11241
- if (event.target.localName === "input" && event.target.getAttribute("data-type") === "av-search") {
+ if (event.target.getAttribute("data-type") === "av-search") {
return;
}
if (protyle.disabled) {
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 2165e82b96..0ed1308616 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -97,6 +97,14 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
event.stopPropagation();
return;
}
+ if (event.target.getAttribute("data-type") === "av-search") {
+ if (matchHotKey("⌘A", event)) {
+ event.preventDefault();
+ getSelection().getRangeAt(0).selectNodeContents(event.target);
+ }
+ event.stopPropagation();
+ return;
+ }
if (protyle.disabled || !protyle.selectElement.classList.contains("fn__none")) {
event.stopPropagation();
event.preventDefault();