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/pull/15906

Vanessa60164eb9e377
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 0d77970c09..d2de823200 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -291,11 +291,9 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
}
this.element.scrollTop = 0;
let currentHintElement = this.element.querySelector(".b3-list-item--focus") as HTMLElement;
- if (isAbnormalItem(currentHintElement, "b3-list-item")) {
+ while (isAbnormalItem(currentHintElement, "b3-list-item")) {
currentHintElement.classList.remove("b3-list-item--focus");
- do {
- currentHintElement = currentHintElement.nextElementSibling as HTMLElement;
- } while (isAbnormalItem(currentHintElement, "b3-list-item"));
+ currentHintElement = currentHintElement.nextElementSibling as HTMLElement;
currentHintElement?.classList.add("b3-list-item--focus");
}
this.bindUploadEvent(protyle, this.element);