@algolia/autocomplete-core 1.19.5 → 1.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,11 +21,10 @@ export function onKeyDown(_ref) {
21
21
  var highlightedItem = getActiveItem(store.getState());
22
22
  var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));
23
23
  if (nodeItem) {
24
- if (nodeItem.scrollIntoViewIfNeeded) {
25
- nodeItem.scrollIntoViewIfNeeded(false);
26
- } else {
27
- nodeItem.scrollIntoView(false);
28
- }
24
+ nodeItem.scrollIntoView({
25
+ block: 'nearest',
26
+ inline: 'nearest'
27
+ });
29
28
  }
30
29
  }; // eslint-disable-next-line no-inner-declarations
31
30
  var triggerOnActive = function triggerOnActive() {
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-core 1.19.5 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-core 1.19.6 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -342,7 +342,7 @@
342
342
  return undefined;
343
343
  }
344
344
 
345
- var version = '1.19.5';
345
+ var version = '1.19.6';
346
346
 
347
347
  var userAgents = [{
348
348
  segment: 'autocomplete-core',
@@ -1919,11 +1919,10 @@
1919
1919
  var highlightedItem = getActiveItem(store.getState());
1920
1920
  var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));
1921
1921
  if (nodeItem) {
1922
- if (nodeItem.scrollIntoViewIfNeeded) {
1923
- nodeItem.scrollIntoViewIfNeeded(false);
1924
- } else {
1925
- nodeItem.scrollIntoView(false);
1926
- }
1922
+ nodeItem.scrollIntoView({
1923
+ block: 'nearest',
1924
+ inline: 'nearest'
1925
+ });
1927
1926
  }
1928
1927
  }; // eslint-disable-next-line no-inner-declarations
1929
1928
  var triggerOnActive = function triggerOnActive() {