Skip to content
Snippets Groups Projects
Commit d1d17ed6 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch...

Merge branch '846-query-strings-do-not-get-passed-when-navigating-legacy-pages-in-spa' into 'release-3.0'

Resolve "Query strings do not get passed when navigating legacy pages in SPA"

See merge request !1222
parents 06db9e23 15e4167c
No related branches found
No related tags found
3 merge requests!1237Release 3.0,!1222Resolve "Query strings do not get passed when navigating legacy pages in SPA",!1183Release 3.0
Pipeline #124069 failed
......@@ -33,6 +33,7 @@ Fixed
* The `Stop Impersonation` button is not shown due to an oversee when changing the type of the whoAmI query to an object of UserType
* Offline fallback page for legacy pages was misleading sometimes.
* Route changes in the Legacy-Component iframe didn't trigger a scroll to the top
* Query strings did not get passed when navigating legacy pages inside of the SPA.
`3.0b3`_ - 2023-03-19
---------------------
......
......@@ -59,13 +59,14 @@ export default {
const location = this.$refs.contentIFrame.contentWindow.location;
const url = new URL(location);
const path = url.pathname.replace(/^\/django/, "");
const pathWithQueryString = path + encodeURI(url.search);
const routePath =
path.charAt(path.length - 1) === "/" &&
this.$route.path.charAt(path.length - 1) !== "/"
? this.$route.path + "/"
: this.$route.path;
if (path !== routePath) {
this.$router.push(path);
this.$router.push(pathWithQueryString);
}
// Show loader if iframe starts to change its content, even if the $route stays the same
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment