Reputation: 11
Script
window.addEventListener('popstate', function (event) {
console.log(core.current.queryString.k);
if (!core.current.queryString.k || core.current.queryString.k == "") {
$(".container").removeClass("some-class");
$(".container-class").css("height", "");
$(".container-class").css("bottom", "50px");
isSearchBarInputted = false;
}
});
The popstate event is skipped upon hitting the back browser button. It works fine before but I guess the recent updates on Chrome affected this. Are there any ways to remediate this? I'm just starting to get familiar with javascript.
Thanks in advance!
Upvotes: 1
Views: 393