Skip to content

Commit 7ce3b19

Browse files
committed
cleanup
1 parent 48f9698 commit 7ce3b19

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/js/custom.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,9 @@ $(document).ready(function() {
119119
hitsPerPage: 10,
120120
},
121121
handleSelected: function (input, event, suggestion, datasetNumber, context) {
122-
console.log(suggestion, context);
123-
if ('click' == context.selectionMethod) {
122+
if (context.selectionMethod == 'click') {
124123
window.location = suggestion.url;
125-
} else if ('enterKey' == context.selectionMethod) {
124+
} else if (context.selectionMethod == 'enterKey') {
126125
window.location = $('.ds-dropdown-menu a.search-page-link').attr('href');
127126
}
128127
},
@@ -132,16 +131,11 @@ $(document).ready(function() {
132131
$(document).on('keydown keypress', 'form.md-search__form', function(event) {
133132
if (event.keyCode == 13) {
134133
event.preventDefault();
134+
135135
return false
136136
}
137137
});
138-
/*
139-
$(document).on('blur', '#search_input', function(event) {
140-
setTimeout(() => {
141-
$('#search_input').val('');
142-
}, 0);
143-
});
144-
*/
138+
145139
$('#search_input, label.md-search__icon').on('click', function() {
146140
var toggle = document.querySelector('[data-md-toggle=search]');
147141
toggle.checked = true;

0 commit comments

Comments
 (0)