diff --git a/frontend/playwright/ui/specs/versions.spec.js b/frontend/playwright/ui/specs/versions.spec.js index f99ae148c..eb74fbae3 100644 --- a/frontend/playwright/ui/specs/versions.spec.js +++ b/frontend/playwright/ui/specs/versions.spec.js @@ -71,4 +71,7 @@ test("Save and restore version", async ({ page }) => { ); await page.getByRole("button", { name: "Restore" }).click(); + + // check that the history panel is closed after restore + await expect(page.getByRole("tab", { name: "design" })).toBeVisible(); }); diff --git a/frontend/src/app/main/data/workspace/versions.cljs b/frontend/src/app/main/data/workspace/versions.cljs index a9de40a13..0808c6f47 100644 --- a/frontend/src/app/main/data/workspace/versions.cljs +++ b/frontend/src/app/main/data/workspace/versions.cljs @@ -126,7 +126,8 @@ ptk/WatchEvent (watch [_ _ _] (rx/concat - (rx/of ::dwp/force-persist) + (rx/of ::dwp/force-persist + (dw/remove-layout-flag :document-history)) (->> (rx/from-atom refs/persistence-state {:emit-current-value? true}) (rx/filter #(or (nil? %) (= :saved %))) (rx/take 1)