MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / isEditorFocused

Function isEditorFocused

packages/app-core/src/lib/vim-nav.ts:128–132  ·  view source on GitHub ↗
(view: EditorView | null)

Source from the content-addressed store, hash-verified

126}
127
128export function isEditorFocused(view: EditorView | null): boolean {
129 if (!view) return false
130 const active = document.activeElement
131 return view.hasFocus || (active instanceof Node && view.dom.contains(active))
132}
133
134// ---------------------------------------------------------------------------
135// Sidebar flat item list

Callers 2

handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected