diff --git a/CHANGES.md b/CHANGES.md index f2f50ec2f..95336fb7d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ ### :bug: Bugs fixed - List view is discarded on tab change on Workspace Assets Sidebar tab [Github #3547](https://github.com/penpot/penpot/issues/3547) +- Fix message popup remains open when exiting workspace with browser back button [Taiga #5747](https://tree.taiga.io/project/penpot/issue/5747) ## 1.19.2 diff --git a/frontend/src/app/main/ui/workspace.cljs b/frontend/src/app/main/ui/workspace.cljs index 090fd7f75..a2a278d5e 100644 --- a/frontend/src/app/main/ui/workspace.cljs +++ b/frontend/src/app/main/ui/workspace.cljs @@ -8,8 +8,10 @@ (:require-macros [app.main.style :refer [css]]) (:require [app.common.data.macros :as dm] + [app.main.data.messages :as msg] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] + [app.main.data.workspace.colors :as dc] [app.main.data.workspace.persistence :as dwp] [app.main.features :as features] [app.main.refs :as refs] @@ -185,6 +187,9 @@ (st/emit! (dw/initialize-file project-id file-id)) (fn [] (st/emit! ::dwp/force-persist + (dc/stop-picker) + (modal/hide) + msg/hide (dw/finalize-file project-id file-id)))) [:& (mf/provider ctx/current-file-id) {:value file-id} diff --git a/frontend/src/app/main/ui/workspace/header.cljs b/frontend/src/app/main/ui/workspace/header.cljs index ecb76d821..81f03930d 100644 --- a/frontend/src/app/main/ui/workspace/header.cljs +++ b/frontend/src/app/main/ui/workspace/header.cljs @@ -13,7 +13,6 @@ [app.main.data.exports :as de] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] - [app.main.data.workspace.colors :as dc] [app.main.data.workspace.common :as dwc] [app.main.data.workspace.libraries :as dwl] [app.main.data.workspace.shortcuts :as sc] @@ -162,9 +161,7 @@ (st/emit! (ptk/event ::ev/event {::ev/name "show-release-notes" :version version})) (if (and (kbd/alt? event) (kbd/mod? event)) (st/emit! (modal/show {:type :onboarding})) - (st/emit! (modal/show {:type :release-notes :version version})))))) - - ] + (st/emit! (modal/show {:type :release-notes :version version}))))))] [:& dropdown {:show true :on-close on-close} [:ul.sub-menu.help-info @@ -582,16 +579,10 @@ (dom/prevent-default event) (reset! editing* true))) - close-modals - (mf/use-fn - #(st/emit! (dc/stop-picker) - (modal/hide))) - go-back (mf/use-fn (mf/deps project) (fn [] - (close-modals) (st/emit! (dw/go-to-dashboard project)))) nav-to-viewer