@algolia/autocomplete-js 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.
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-js 1.19.5 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-js 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) :
@@ -347,7 +347,7 @@
347
347
  return undefined;
348
348
  }
349
349
 
350
- var version = '1.19.5';
350
+ var version = '1.19.6';
351
351
 
352
352
  var userAgents$1 = [{
353
353
  segment: 'autocomplete-core',
@@ -2556,11 +2556,10 @@
2556
2556
  var highlightedItem = getActiveItem(store.getState());
2557
2557
  var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, "item-".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));
2558
2558
  if (nodeItem) {
2559
- if (nodeItem.scrollIntoViewIfNeeded) {
2560
- nodeItem.scrollIntoViewIfNeeded(false);
2561
- } else {
2562
- nodeItem.scrollIntoView(false);
2563
- }
2559
+ nodeItem.scrollIntoView({
2560
+ block: 'nearest',
2561
+ inline: 'nearest'
2562
+ });
2564
2563
  }
2565
2564
  }; // eslint-disable-next-line no-inner-declarations
2566
2565
  var triggerOnActive = function triggerOnActive() {