Skip to content

Commit 9d68a72

Browse files
committed
IBX-4064: Search adjustements (#2566)
* custom.js: "See all results" → "See more results" * custom.js: No search result highlight on keyboard navigation (cherry picked from commit 33fc6d9)
1 parent 95b7491 commit 9d68a72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/js/custom.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ $(document).ready(function() {
121121
let link = $('.ds-dropdown-menu a.search-page-link');
122122
if (!link.length) {
123123
$('.ds-dropdown-menu').append(`<div class="search-page-link-wrapper">
124-
<a class="search-page-link" href="">See all results</a>
124+
<a class="search-page-link" href="">See more results</a>
125125
</div>`);
126126
link = $('.ds-dropdown-menu a.search-page-link');
127127
}
@@ -142,6 +142,7 @@ $(document).ready(function() {
142142
debug: false,
143143
});
144144
search.autocomplete.on('autocomplete:updated', event => {
145+
$('.ds-cursor').removeClass('ds-cursor');
145146
const searchedText = $('#search_input')[0].value.trim();
146147
const separatorText = '›';
147148
const separatorClass = 'aa-suggestion-title-separator';
@@ -168,8 +169,9 @@ $(document).ready(function() {
168169
});
169170

170171
$(document).on('keydown keypress', 'form.md-search__form', function(event) {
171-
if (event.keyCode == 13) {
172+
if (-1 != $.inArray(event.key, ['Enter', 'ArrowDown', 'ArrowUp'])) {
172173
event.preventDefault();
174+
$('.ds-cursor').removeClass('ds-cursor');
173175

174176
return false;
175177
}

0 commit comments

Comments
 (0)