diff --git a/adminer/static/editing.js b/adminer/static/editing.js index fcd9d9fd..e910faa1 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -4,6 +4,9 @@ * @param string first three characters of database system version */ function bodyLoad(version) { + if (history.state) { // copied from editor/static/editing.js + onpopstate(history); + } var jushRoot = '../externals/jush/'; var script = document.createElement('script'); script.src = jushRoot + 'jush.js'; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index dae001c4..4200e62a 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -354,7 +354,7 @@ function ajaxMain(url, data, event) { } /** Revive page from history -* @param PopStateEvent +* @param PopStateEvent|history */ window.onpopstate = function (event) { ajaxSend(location.href, event.state, 1); // 1 - disable pushState diff --git a/editor/static/editing.js b/editor/static/editing.js index 70998ba6..47fc8e72 100644 --- a/editor/static/editing.js +++ b/editor/static/editing.js @@ -1,4 +1,7 @@ // Editor specific functions function bodyLoad(version) { + if (history.state) { + onpopstate(history); + } }