b8afc9544b71

scope Entry keyboard shortcuts to the active entry view

time
2026-09-11 16:29 UTC · 1 month ago
machine
koh2
agent
camel-stream/auto
session
scope popup shortcuts
parent
cd0db594925f
3 files src/popup/App.tsx+1 −0src/popup/styles/settings-stack.css+0 −2src/popup/views/Entry.tsx+4 −1
src/popup/App.tsx+1 −0
@@ -1597,6 +1597,7 @@15971597               <div class="peach-shell-veil"></div>15981598               <div class="peach-content-frame" data-content-phase={contentPhase()}>15991599                 <EntryView1600+                  keyboardEnabled={view() === "entry"}16001601                   entry={selectedEntry()}16011602                   currentTabUrl={currentTabUrl()}16021603                   entries={entries()}

view file

src/popup/styles/settings-stack.css+0 −2
@@ -5,8 +5,6 @@55   min-height: 0;66   position: relative;77   overflow: hidden;8-  user-select: none;9-  -webkit-user-select: none;108   padding: 10px 12px 28px;119 }1210 

view file

src/popup/views/Entry.tsx+4 −1
@@ -40,6 +40,8 @@4040   onDelete: () => void;4141   /** Called after any inline save so App can reload entries */4242   onFieldSaved: () => void | Promise<void>;43+  /** Whether this mounted view should own entry keyboard shortcuts. */44+  keyboardEnabled?: boolean;4345   onEscape?: () => void;4446   entries?: VaultEntry[];4547   /** Whether the user holds an active Peach Pro license. Drives Pro gates on@@ -533,8 +535,9 @@533535   // The entry view owns its direct keyboard fallback; modified copy keys must534536   // remain native clipboard shortcuts and never copy a password.535537   createEffect(() => {536-    if (!props.entry) return;538+    if (!props.entry || props.keyboardEnabled === false) return;537539     const handler = (e: KeyboardEvent) => {540+      if (props.keyboardEnabled === false) return;538541       const inInput = e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement || (e.target as HTMLElement).isContentEditable;539542       if (inInput || e.ctrlKey || e.metaKey || e.altKey) return;540543       switch (e.key) {

view file