diff --git a/CHANGES.md b/CHANGES.md index 5123bedf7a..8cced8103d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ - Fix toggle focus mode did not restore viewport and selection upon exit [GitHub #6280](https://github.com/penpot/penpot/issues/6820) - Fix problem when creating a layout from an existing layout [Taiga #11554](https://tree.taiga.io/project/penpot/issue/11554) - Fix title button from Title Case to Capitalize [Taiga #11476](https://tree.taiga.io/project/penpot/issue/11476) +- Fix Main component receives focus and is selected when using 'Show Main Component' [Taiga #11402](https://tree.taiga.io/project/penpot/issue/11402) ## 2.8.0 diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index 4d28a60c21..4a06dd72c5 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -36,6 +36,7 @@ [app.main.data.workspace :as-alias dw] [app.main.data.workspace.groups :as dwg] [app.main.data.workspace.notifications :as-alias dwn] + [app.main.data.workspace.pages :as-alias dwpg] [app.main.data.workspace.selection :as dws] [app.main.data.workspace.shapes :as dwsh] [app.main.data.workspace.specialized-panel :as dwsp] @@ -700,7 +701,7 @@ (fn [page-id shape-id] (rx/merge (->> stream - (rx/filter (ptk/type? ::dw/initialize-page)) + (rx/filter (ptk/type? ::dwpg/initialize-page)) (rx/take 1) (rx/observe-on :async) (rx/mapcat (fn [_] (select-and-zoom shape-id))))