FEATURE: Navigate through search results using J/K (#9264)

FEATURE: Navigate through search results using J/K (#9264)

diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js
index 5da8be5..064c2ee 100644
--- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js
+++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js
@@ -53,7 +53,8 @@ export let bindings = {
       ".topic-list tr.selected a.title",
       ".latest-topic-list .latest-topic-list-item.selected div.main-link a.title",
       ".top-topic-list .latest-topic-list-item.selected div.main-link a.title",
-      ".latest .featured-topic.selected a.title"
+      ".latest .featured-topic.selected a.title",
+      ".search-results .search-link"
     ].join(", "),
     anonymous: true
   }, // open selected topic on latest or categories page
@@ -589,6 +590,7 @@ export default {
     const $topicList = $(".topic-list");
     const $postsWrapper = $(".posts-wrapper");
     const $categoriesTopicsList = this.categoriesTopicsList();
+    const $searchResults = $(".search-results");
 
     if ($postsWrapper.length > 0) {
       return $(".posts-wrapper .topic-post, .topic-list tbody tr");
@@ -596,6 +598,8 @@ export default {
       return $topicList.find(".topic-list-item");
     } else if ($categoriesTopicsList.length > 0) {
       return $categoriesTopicsList;
+    } else if ($searchResults.length > 0) {
+      return $searchResults.find(".fps-result");
     }
   },
 
diff --git a/app/assets/stylesheets/common/base/search.scss b/app/assets/stylesheets/common/base/search.scss
index 9561a6b..e62f24f 100644
--- a/app/assets/stylesheets/common/base/search.scss
+++ b/app/assets/stylesheets/common/base/search.scss
@@ -192,6 +192,8 @@
 
 .fps-result {
   display: flex;
+  padding: 0 0.5em;
+
   .author {
     display: inline-block;
     vertical-align: top;
diff --git a/app/assets/stylesheets/common/components/keyboard_shortcuts.scss b/app/assets/stylesheets/common/components/keyboard_shortcuts.scss
index c40eaef..e743976 100644
--- a/app/assets/stylesheets/common/components/keyboard_shortcuts.scss
+++ b/app/assets/stylesheets/common/components/keyboard_shortcuts.scss
@@ -5,7 +5,8 @@
 
 .topic-list tr.selected td:first-child,
 .topic-list-item.selected td:first-child,
-.latest-topic-list-item.selected {
+.latest-topic-list-item.selected,
+.search-results .fps-result.selected {
   box-shadow: inset 3px 0 0 $danger; // needs to be inset for Edge
 }
 

GitHub sha: 70012f20

This commit appears in #9264 which was approved by eviltrout. It was merged by SamSaffron.