From 4a299009dbe9758aa6a5da22a65f2921bc252f14 Mon Sep 17 00:00:00 2001 From: Tatu Wikman Date: Tue, 5 Dec 2023 13:11:32 +0200 Subject: [PATCH] use querySelector and listTop --- src/js/modules/facetedsearch/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/modules/facetedsearch/update.ts b/src/js/modules/facetedsearch/update.ts index a80c97854..10fd704f5 100644 --- a/src/js/modules/facetedsearch/update.ts +++ b/src/js/modules/facetedsearch/update.ts @@ -85,7 +85,7 @@ export default () => { */ $('body').on('click', Theme.selectors.listing.pagerLink, (event) => { event.preventDefault(); - document.getElementById('js-product-list-top')?.scrollIntoView({block: 'start', behavior: 'auto'}); + document.querySelector(Theme.selectors.listing.listTop)?.scrollIntoView({block: 'start', behavior: 'auto'}); prestashop.emit( events.updateFacets, $(event.target)?.closest('a')?.get(0)?.getAttribute('href'),