(element: HTMLElement | null | undefined)
| 10 | * plain buttons return false, so they keep their own focus. (#100) |
| 11 | */ |
| 12 | export function hintTargetOpensNote(element: HTMLElement | null | undefined): boolean { |
| 13 | if (!element) return false |
| 14 | const sidebarPath = element.closest('[data-sidebar-path]')?.getAttribute('data-sidebar-path') |
| 15 | if (sidebarPath && !isWorkspaceVirtualTabPath(sidebarPath)) return true |
| 16 | const tabPath = element.closest('[data-tab-path]')?.getAttribute('data-tab-path') |
| 17 | return !!tabPath && !isWorkspaceVirtualTabPath(tabPath) |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * True when a keydown inside the home view (`data-home-nav`) should yield to the |
no test coverage detected