From f06501d631a283396c6a6a4ab7ec5127b30dddf4 Mon Sep 17 00:00:00 2001 From: Alex Gu Date: Sun, 13 Jun 2021 23:03:45 +0300 Subject: [PATCH] Shortcuts no longer changes browser behavior. Now need to use Ctrl+Alt+Up/Left/Right instead if browser uses Alt+Up/Left/Right. (If browser don't use Alt+Up/Left/Right, it is still used for switch hyphae) --- static/shortcuts.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/shortcuts.js b/static/shortcuts.js index 3566a98..9feae7c 100644 --- a/static/shortcuts.js +++ b/static/shortcuts.js @@ -153,7 +153,6 @@ this.active = this.active[shortcut]; if (this.active.action) { this.active.action(event); - event.preventDefault(); this.resetActive(); return; } @@ -315,9 +314,9 @@ globalShortcuts.groupStart(); globalShortcuts.fakeItem('1 – 9', 'First 9 hypha′s links'); - bindElement('p, Alt+ArrowLeft', '.prevnext__prev', 'Next hypha'); - bindElement('n, Alt+ArrowRight', '.prevnext__next', 'Previous hypha'); - bindElement('s, Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha'); + bindElement('p, Alt+ArrowLeft, Ctrl+Alt+ArrowLeft', '.prevnext__prev', 'Next hypha'); + bindElement('n, Alt+ArrowRight, Ctrl+Alt+ArrowRight', '.prevnext__next', 'Previous hypha'); + bindElement('s, Alt+ArrowTop, Ctrl+Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha'); bindElement('e', '.hypha-tabs__link[href^="/edit/"]', 'Edit this hypha'); globalShortcuts.groupEnd();