From a088cf8706c73058e2442a27c10bbe8fc612d1bb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 1 Aug 2025 20:14:12 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15404 --- app/src/protyle/toolbar/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 171f8574e..772385d46 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -1291,10 +1291,10 @@ export class Toolbar { } html = `
${window.siyuan.languages.clear}
` + 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(); });