Skip to content

Commit a272adc

Browse files
committed
feat: update keyboard shortcut registration to focus search bar and improve scroll behavior handling
1 parent ecd7650 commit a272adc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Pages/Shared/CommandBar/CommandBarBackdrop.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const CommandBarBackdrop = ({ handleClose }: CommandBarBackdropProps) => {
203203
}, [isLoading, recentActionsGroup])
204204

205205
useEffect(() => {
206-
const { keys } = SHORT_CUTS.OPEN_COMMAND_BAR
206+
const { keys } = SHORT_CUTS.FOCUS_SEARCH_BAR
207207

208208
registerShortcut({
209209
keys,
@@ -269,7 +269,7 @@ const CommandBarBackdrop = ({ handleClose }: CommandBarBackdropProps) => {
269269
})
270270
}
271271

272-
// Add this handler to prevent browser native scrolling
272+
// To handle native scroll behavior
273273
const handleListBoxKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
274274
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
275275
e.preventDefault()

0 commit comments

Comments
 (0)