Skip to content

Commit

Permalink
fix: Improve /menu (#14111)
Browse files Browse the repository at this point in the history
如果选项隐藏了 (display:none),按上下方向键时就跳过
  • Loading branch information
TCOTC authored Feb 17, 2025
1 parent d8415bc commit 10a9ef1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/util/upDownHint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const isNormalItem = (currentHintElement: HTMLElement, className: string) => {
return currentHintElement.classList.contains("fn__none") || !currentHintElement.classList.contains(className);
return currentHintElement.classList.contains("fn__none") || !currentHintElement.classList.contains(className) ||
// https://github.com/siyuan-note/siyuan/issues/12518
currentHintElement.getBoundingClientRect().height === 0;
};

export const upDownHint = (listElement: Element, event: KeyboardEvent, classActiveName = "b3-list-item--focus", defaultElement?: Element) => {
Expand Down

0 comments on commit 10a9ef1

Please sign in to comment.