Browse Source

fix(ui): allow text editing shortcuts in search dialogs on macOS (#7419)

zerone0x 1 month ago
parent
commit
b6b0097755
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/ui/src/hooks/use-filtered-list.tsx

+ 2 - 0
packages/ui/src/hooks/use-filtered-list.tsx

@@ -82,6 +82,8 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
       const selected = flat()[selectedIndex]
       const selected = flat()[selectedIndex]
       if (selected) props.onSelect?.(selected, selectedIndex)
       if (selected) props.onSelect?.(selected, selectedIndex)
     } else {
     } else {
+      // Skip list navigation for text editing shortcuts (e.g., Option+Arrow, Option+Backspace on macOS)
+      if (event.altKey || event.metaKey) return
       list.onKeyDown(event)
       list.onKeyDown(event)
     }
     }
   }
   }