diff --git a/.dockerignore b/.dockerignore index 951e486d..e3c038d8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,6 +15,7 @@ tests/* !tests/frontend-compat.test.mjs !tests/block-selection.test.mjs !tests/datepicker-compat.test.mjs +!tests/preview-url.test.mjs !tests/vite-compat.test.mjs docs vendor diff --git a/_dev/src/components/Iframe.vue b/_dev/src/components/Iframe.vue index 780b94b2..c5292261 100644 --- a/_dev/src/components/Iframe.vue +++ b/_dev/src/components/Iframe.vue @@ -35,6 +35,9 @@ let currentPrettyBlocksId = computed(() => currentBlock.id_prettyblocks) */ onMounted(() => { prettyBlocksContext.setIframe() + if (new URL(window.location.href).searchParams.has('startup_url')) { + prettyBlocksContext.pushUrl(prettyBlocksContext.psContext.current_url) + } }) watch(currentBlock, (newVal, oldValue) => { @@ -51,11 +54,7 @@ const reloadIframe = () => { } -let filteredURL = ref(prettyBlocksContext.updateFilteredURL(ajax_urls.startup_url)) - -watch(prettyBlocksContext.psContext, () => { - filteredURL.value = prettyBlocksContext.updateFilteredURL(prettyBlocksContext.psContext.current_url) -}) +const filteredURL = computed(() => prettyBlocksContext.psContext.current_url)