From 6fddca4e4f959c81734f402d1bbce3f1b289936e Mon Sep 17 00:00:00 2001 From: Dinis Date: Wed, 17 Jul 2019 15:18:44 +0100 Subject: [PATCH] Force page reload with anchors Force page to reload even when the location contains anchors, while using "web2py-redirect-location". Otherwise, when the location is the same and the url has an anchor it won't redirect. --- applications/admin/static/js/web2py.js | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index 22b9f253..b4c0a5d3 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -284,6 +284,7 @@ var redirect = xhr.getResponseHeader('web2py-redirect-location'); if (redirect !== null) { window.location = redirect; + window.location.reload(); // Force reload even with anchors } /* run this here only if this Ajax request is NOT for a web2py component. */ if (xhr.getResponseHeader('web2py-component-content') === null) {