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.
1 parent 3b8782b commit cd84e40Copy full SHA for cd84e40
static/js/com/search/search.js
@@ -14,6 +14,7 @@ $(document).ready(function () {
14
$closeButton = $('.search-popup__close'),
15
$layout = $('.global-layout');
16
17
+ let isInited = false;
18
19
const search = Instantsearch({
20
appId: '7961PKYRXV',
@@ -58,11 +59,14 @@ $(document).ready(function () {
58
59
})
60
);
61
- search.start();
62
-
63
const $input = $('.ais-search-box input');
64
65
function openPopup() {
+ if (!isInited) {
66
+ search.start();
67
+ isInited = true;
68
+ }
69
+
70
$searchPopup.removeClass('_hidden');
71
$('body').addClass('_no-scroll');
72
$('.ais-search-box--input').focus();
0 commit comments