Skip to content

Commit 7b6aa74

Browse files
committed
MAGE-899 remove obsolete submit handler for AC v0
1 parent 77ec916 commit 7b6aa74

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

view/frontend/web/js/internals/common.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -471,34 +471,6 @@ define(['jquery', 'algoliaInstantSearchLib', 'algoliaBase64'], function ($, inst
471471
);
472472
}
473473

474-
// TODO move as mixable to autocomplete.js
475-
const handleAutoCompleteSubmit = (e) => {
476-
let query = $(this).find(algoliaConfig.autocomplete.selector).val();
477-
478-
query = encodeURIComponent(query);
479-
480-
if (algoliaConfig.instant.enabled && query === '')
481-
query = '__empty__';
482-
483-
window.location = $(this).attr('action') + '?q=' + query;
484-
485-
return false;
486-
};
487-
488-
const initialize = () => {
489-
if (typeof algoliaConfig === 'undefined') {
490-
return;
491-
}
492-
$(algoliaConfig.autocomplete.selector).each(function () {
493-
$(this).closest('form').on('submit', handleAutoCompleteSubmit);
494-
});
495-
}
496-
497-
498-
$(function ($) {
499-
initialize();
500-
});
501-
502474
return {
503475
...algolia,
504476
routing,

0 commit comments

Comments
 (0)