Skip to content

Commit

Permalink
Merge pull request #8 from digitalutsc/issue/7
Browse files Browse the repository at this point in the history
Fixed redundant reload when a facet link is clicked
  • Loading branch information
kylehuynh205 authored Sep 7, 2021
2 parents 720abcb + 316c50e commit a1b3541
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions js/facets/facets-views-ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@
updatePagerElementsStatus();
});

window.addEventListener('beforeunload', function (e) {
//e.preventDefault();
//e.returnValue = '';

//delete e['returnValue'];
});

/**
* Kyle added to handler of implement display mode (list or grid) whenever drupal.ajax is finished execute
*/
Expand Down Expand Up @@ -235,6 +228,8 @@
return;
}
e.preventDefault();
// Fixed redundant reload when a facet link is clicked
e.stopImmediatePropagation();
window.history.pushState(null, document.title, $(this).attr("href"));

});
Expand Down

0 comments on commit a1b3541

Please sign in to comment.