mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-17 08:54:27 +02:00
fix: strip playback accelerators whenever any text input is focused (#2059)
The command-palette-specific IPC approach didn't cover other modals with inputs (settings search, playlist creation, etc.). Replace it with document-level focusin/focusout listeners that signal the main process whenever any input/textarea/contenteditable gains or loses focus, so the menu rebuild is triggered automatically for all current and future input surfaces. Co-authored-by: muckymucky <muckymucky@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -201,22 +201,17 @@ export const useAppStore = createWithEqualityFn<AppSlice>()(
|
||||
set((state) => {
|
||||
state.commandPalette.opened = false;
|
||||
});
|
||||
window.api?.utils?.setCommandPaletteOpen?.(false);
|
||||
},
|
||||
open: () => {
|
||||
set((state) => {
|
||||
state.commandPalette.opened = true;
|
||||
});
|
||||
window.api?.utils?.setCommandPaletteOpen?.(true);
|
||||
},
|
||||
opened: false,
|
||||
toggle: () => {
|
||||
let nextOpened = false;
|
||||
set((state) => {
|
||||
state.commandPalette.opened = !state.commandPalette.opened;
|
||||
nextOpened = state.commandPalette.opened;
|
||||
});
|
||||
window.api?.utils?.setCommandPaletteOpen?.(nextOpened);
|
||||
},
|
||||
},
|
||||
commandPaletteSearchSectionsExpanded: {},
|
||||
|
||||
Reference in New Issue
Block a user