From 70373550cf9ce0b16137637b9817a4ef73d9ad59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Sat, 26 Feb 2022 16:50:15 +0100 Subject: [PATCH] (core) Shortcuts help page can be scrolled using a keyboard Summary: Restoring keyboard navigation on the shortcuts popup. Test Plan: manual tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3295 --- app/client/ui/App.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/client/ui/App.ts b/app/client/ui/App.ts index a6246193..0d8aaa95 100644 --- a/app/client/ui/App.ts +++ b/app/client/ui/App.ts @@ -118,6 +118,13 @@ export class App extends DisposableWithEvents { this.autoDispose(commands.createGroup({ cancel() { isHelpPaneVisible(false); }, + cursorDown() { helpDiv.scrollBy(0, 30); }, // 30 is height of the row in the help screen + cursorUp() { helpDiv.scrollBy(0, -30); }, + pageUp() { helpDiv.scrollBy(0, -helpDiv.clientHeight); }, + pageDown() { helpDiv.scrollBy(0, helpDiv.clientHeight); }, + moveToFirstField() { helpDiv.scrollTo(0, 0); }, // home + moveToLastField() { helpDiv.scrollTo(0, helpDiv.scrollHeight); }, // end + find() { return true; }, // restore browser search help() { isHelpPaneVisible(false); }, }, this, isHelpPaneVisible));