Skip to content

Commit 77ec916

Browse files
committed
MAGE-899 split out keyboard nav enablement for mixin support
1 parent 4fd72e7 commit 77ec916

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

view/frontend/web/js/autocomplete.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ define([
8080

8181
this.addFooter();
8282

83-
if (algoliaConfig.autocomplete.isNavigatorEnabled) {
84-
$('body').append(
85-
'<style>.aa-Item[aria-selected="true"]{background-color: #f2f2f2;}</style>'
86-
);
87-
}
83+
this.addKeyboardNavigation();
8884
},
8985

9086
getSearchClient() {
@@ -850,6 +846,14 @@ define([
850846
$('.aa-Panel').addClass('productColumn1');
851847
}
852848

849+
},
850+
851+
addKeyboardNavigation() {
852+
if (algoliaConfig.autocomplete.isNavigatorEnabled) {
853+
$('body').append(
854+
'<style>.aa-Item[aria-selected="true"]{background-color: #f2f2f2;}</style>'
855+
);
856+
}
853857
}
854858
});
855859
});

0 commit comments

Comments
 (0)