mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
drafts: Allow vim up and down key to scroll between drafts.
Added a fix to bind vim_up(k) and vim_down(j) keys with the draft section, allowing users to scroll between the drafts using 'k' (scroll up) and 'j'(scroll down) keys. Fixes #18397
This commit is contained in:
committed by
Tim Abbott
parent
c25155a143
commit
9f15de41f3
@@ -471,13 +471,13 @@ export function drafts_handle_events(e, event_key) {
|
||||
|
||||
// This detects up arrow key presses when the draft overlay
|
||||
// is open and scrolls through the drafts.
|
||||
if (event_key === "up_arrow") {
|
||||
if (event_key === "up_arrow" || event_key === "vim_up") {
|
||||
drafts_scroll(row_before_focus());
|
||||
}
|
||||
|
||||
// This detects down arrow key presses when the draft overlay
|
||||
// is open and scrolls through the drafts.
|
||||
if (event_key === "down_arrow") {
|
||||
if (event_key === "down_arrow" || event_key === "vim_down") {
|
||||
drafts_scroll(row_after_focus());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user