We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 968e568 + 34d805d commit 35650aaCopy full SHA for 35650aa
assets/js/search.js
@@ -17,6 +17,15 @@ limitations under the License.
17
var Search = {
18
init: function () {
19
$(document).ready(function () {
20
+ // Fill the search input form with the current search keywords
21
+ const searchKeywords = new URLSearchParams(location.search).get('q');
22
+ if (searchKeywords !== null && searchKeywords !== '') {
23
+ const searchInput = document.querySelector('.td-search-input');
24
+ searchInput.focus();
25
+ searchInput.value = searchKeywords;
26
+ }
27
+
28
+ // Set a keydown event
29
$(document).on("keypress", ".td-search-input", function (e) {
30
if (e.keyCode !== 13) {
31
return;
0 commit comments