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

Vanessaa088cf8706c7
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 171f8574ea..772385d460 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -1291,10 +1291,10 @@ export class Toolbar {
}
html = `<div class="b3-list-item">${window.siyuan.languages.clear}</div>` + html;
listElement.innerHTML = html;
- if (listElement.firstElementChild.nextElementSibling) {
- listElement.firstElementChild.nextElementSibling.classList.add("b3-list-item--focus");
+ if (listElement.childElementCount > 2) {
+ listElement.firstElementChild.nextElementSibling.nextElementSibling.classList.add("b3-list-item--focus");
} else {
- listElement.firstElementChild.classList.add("b3-list-item--focus");
+ listElement.firstElementChild.nextElementSibling.classList.add("b3-list-item--focus");
}
event.stopPropagation();
});