Skip to content

Commit

Permalink
Merge pull request PrestaShop#8082 from fatmaBouchekoua/BOOM-3288
Browse files Browse the repository at this point in the history
Scroll top to product list when paginate
  • Loading branch information
eternoendless authored Aug 25, 2017
2 parents 0790028 + 9245f05 commit 03c2b34
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 32 deletions.
1 change: 1 addition & 0 deletions themes/_core/js/facets.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function updateResults (data) {
pendingQuery = false;
prestashop.emit('updateProductList', data);
window.history.pushState(data, undefined, data.current_url);
window.scrollTo(0, 0);
}

function handleError () {
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/_dev/js/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $(document).ready(() => {

$('body').on('click', '.js-search-link', function (event) {
event.preventDefault();
prestashop.emit('updateFacets',$(event.target).closest('a').get(0).href);
prestashop.emit('updateFacets', $(event.target).closest('a').get(0).href);
});

$('body').on('change', '#search_filters select', function (event) {
Expand Down
61 changes: 31 additions & 30 deletions themes/core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/core.js.map

Large diffs are not rendered by default.

0 comments on commit 03c2b34

Please sign in to comment.