FEATURE: Navigate through search results using J/K (#9264)
This commit is contained in:
parent
35e153d84f
commit
70012f2027
|
@ -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");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -192,6 +192,8 @@
|
|||
|
||||
.fps-result {
|
||||
display: flex;
|
||||
padding: 0 0.5em;
|
||||
|
||||
.author {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue