Skip to content

Commit

Permalink
fix: prevent default scrolling behavior while using arrow keys to swi…
Browse files Browse the repository at this point in the history
…tch between entries (#1447)

* fix: prevent default scrolling behaviour while using arrow keys to switch between entries

* chore: update changelog

* chore: update changelog
  • Loading branch information
CanglongCl authored Nov 7, 2024
1 parent ec82f03 commit ed5ee50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const EntryColumnShortcutHandler: FC<{
entryId: nextId,
})
},
{ scopes: HotKeyScopeMap.Home, enabled: enabledArrowKey },
{ scopes: HotKeyScopeMap.Home, enabled: enabledArrowKey, preventDefault: true },
)
useHotkeys(
shortcuts.entries.previous.key,
Expand All @@ -87,7 +87,7 @@ export const EntryColumnShortcutHandler: FC<{
entryId: nextId,
})
},
{ scopes: HotKeyScopeMap.Home, enabled: enabledArrowKey },
{ scopes: HotKeyScopeMap.Home, enabled: enabledArrowKey, preventDefault: true },
)
return null
})
2 changes: 2 additions & 0 deletions changelog/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
- Improvement web app global shortcuts.

## Bug Fixes

- While using arrow keys to switch between entries, the entry view will not scroll unexpexted.

0 comments on commit ed5ee50

Please sign in to comment.