mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
fixed #867 - added proper detection so that onpopstate would not react if it was a proper page load
This commit is contained in:
@@ -23,7 +23,7 @@ var ajaxify = {};
|
||||
|
||||
|
||||
window.onpopstate = function (event) {
|
||||
if (event !== null && event.state && event.state.url !== undefined) {
|
||||
if (event !== null && event.state && event.state.url !== undefined && !ajaxify.initialLoad) {
|
||||
ajaxify.go(event.state.url, null, true);
|
||||
}
|
||||
};
|
||||
@@ -31,6 +31,7 @@ var ajaxify = {};
|
||||
var pagination, paginator_bar;
|
||||
|
||||
ajaxify.currentPage = null;
|
||||
ajaxify.initialLoad = false;
|
||||
|
||||
ajaxify.go = function (url, callback, quiet) {
|
||||
// "quiet": If set to true, will not call pushState
|
||||
|
||||
Reference in New Issue
Block a user