diff --git a/.changeset/long-toes-pull.md b/.changeset/long-toes-pull.md new file mode 100644 index 0000000000..ff7df00127 --- /dev/null +++ b/.changeset/long-toes-pull.md @@ -0,0 +1,5 @@ +--- +'@directus/app': patch +--- + +Fixed an endless refresh loop in the live preview of an item accessed through a bookmarked view diff --git a/app/src/modules/content/routes/item.vue b/app/src/modules/content/routes/item.vue index 82772846d1..38067cc868 100644 --- a/app/src/modules/content/routes/item.vue +++ b/app/src/modules/content/routes/item.vue @@ -257,7 +257,8 @@ watch( return; } - const targetUrl = window.location.href + (window.location.href.endsWith('/') ? 'preview' : '/preview'); + const targetUrl = new URL(window.location.href); + targetUrl.pathname += targetUrl.pathname.endsWith('/') ? 'preview' : '/preview'; popupWindow = window.open( targetUrl,