]> git.joonet.de Git - adminer.git/commitdiff
Avoid double AJAX refresh in Chrome
authorJakub Vrana <jakub@vrana.cz>
Thu, 17 Mar 2011 22:48:38 +0000 (23:48 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 17 Mar 2011 22:48:38 +0000 (23:48 +0100)
adminer/static/editing.js
adminer/static/functions.js
editor/static/editing.js

index aad7cf03bfeaa6c24b80e72c237343140efa9366..757d8ee2bc6bc9cb1996e44b87eff07e010a8d49 100644 (file)
@@ -4,9 +4,7 @@
 * @param string first three characters of database system version
 */
 function bodyLoad(version) {
-       if (history.state) { // copied from editor/static/editing.js
-               onpopstate(history);
-       }
+       onpopstate(history); // copied from editor/static/editing.js
        var jushRoot = '../externals/jush/';
        var script = document.createElement('script');
        script.src = jushRoot + 'jush.js';
index 963224d956e4cf5f0326160cb54ca8c281ddd4e0..6cf09ebc3800b0b4827044d98300fd0f49b9ff97 100644 (file)
@@ -346,7 +346,7 @@ function ajaxSend(url, data, popState) {
 * @param PopStateEvent|history
 */
 onpopstate = function (event) {
-       if (!event.state || confirm(areYouSure)) {
+       if (event.state ? confirm(areYouSure) : ajaxState) {
                ajaxSend(location.href, event.state, 1); // 1 - disable pushState
        }
 }
index 47fc8e72589d3ffa6674ae7641bc1264a3840b64..b58ed71aff434b8a972742dcb8200b0550df320a 100644 (file)
@@ -1,7 +1,5 @@
 // Editor specific functions
 
 function bodyLoad(version) {
-       if (history.state) {
-               onpopstate(history);
-       }
+       onpopstate(history);
 }