From 843d4eb03ae8f2ae714a1b3b5d3ce77fa1f550da Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:39:08 +1300 Subject: [PATCH] Go to side pane keyboard nav --- app/static/js/scripts.js | 3 +++ app/templates/base.html | 1 + app/templates/community/add_post.html | 2 +- app/templates/community/community.html | 2 +- app/templates/domain/domain.html | 2 +- app/templates/domain/domains.html | 2 +- app/templates/donate.html | 2 +- app/templates/index.html | 2 +- app/templates/keyboard_shortcuts.html | 2 +- app/templates/post/add_reply.html | 2 +- app/templates/post/continue_discussion.html | 2 +- app/templates/post/post.html | 2 +- app/templates/post/post_edit.html | 2 +- app/templates/post/post_reply_edit.html | 2 +- app/templates/privacy.html | 2 +- app/templates/topic/show_topic.html | 2 +- app/templates/user/notifications.html | 2 +- app/templates/user/people.html | 2 +- app/templates/user/show_profile.html | 2 +- 19 files changed, 21 insertions(+), 17 deletions(-) diff --git a/app/static/js/scripts.js b/app/static/js/scripts.js index 24aa9772..f56738f7 100644 --- a/app/static/js/scripts.js +++ b/app/static/js/scripts.js @@ -386,6 +386,9 @@ var showCurrentPost = false; // when true, the currently selected post will b function setupKeyboardShortcuts() { document.addEventListener('keydown', function(event) { if (document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA') { + if(document.activeElement.tagName !== 'A' && document.activeElement.classList.contains('skip-link')) { + return; + } var didSomething = false; if(event.shiftKey && event.key === '?') { location.href = '/keyboard_shortcuts'; diff --git a/app/templates/base.html b/app/templates/base.html index a1daff11..ece3cbdd 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -92,6 +92,7 @@ + {% block navbar %} -