Skip to content

Commit

Permalink
use querySelector and listTop
Browse files Browse the repository at this point in the history
  • Loading branch information
tswfi committed Dec 5, 2023
1 parent ead8f3b commit 4a29900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/modules/facetedsearch/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 4a29900

Please sign in to comment.