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(); });