Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions packages/app-core/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1029,20 +1029,12 @@ function App(): JSX.Element {
!!document.querySelector('[data-prompt-modal]') ||
!!document.querySelector('[data-confirm-modal]') ||
!!document.querySelector('[data-cloud-conflict-dialog]')
// Search Notes is a toggle: its own shortcut closes the palette it
// opened (#510 moved it here from the bubble handler, which had no
// overlay guard at all). A confirm on top of the palette, such as the
// Ctrl+D trash confirmation, keeps the key to itself.
if (
state.searchOpen &&
!modalOrMenuOpen &&
matchesShortcut(e, overrides, 'global.searchNotes')
) {
e.preventDefault()
e.stopImmediatePropagation()
setSearchOpen(false)
return
}
// `global.searchNotes` is deliberately not a toggle. `Mod+P` resolves to
// `Ctrl+P` on Linux and Windows, which is also the Emacs previous-item
// chord every palette handles via `isPalettePreviousKey()`. A toggle here
// ran capture-phase and called `stopImmediatePropagation()`, making that
// branch unreachable while the palette was open (#933). Escape dismisses.
// Do not reinstate a toggle above the overlay guard.
if (
state.settingsOpen ||
state.whatsNewOpen ||
Expand Down
Loading