From 4b1fa2589e94cfe01756df4a8e5efc5b87cde3ac Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 4 Oct 2021 17:05:37 +0200 Subject: [PATCH] :bug: Fix menu context for single element nested in components --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/context_menu.cljs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 34a49d12e7..1706f9ebdc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ ### :bug: Bugs fixed - Fix problem with overflow dropdown on stroke-cap [#1216](https://github.com/penpot/penpot/issues/1216) +- Fix menu context for single element nested in components [#1186](https://github.com/penpot/penpot/issues/1186) ### :arrow_up: Deps updates ### :boom: Breaking changes diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index 4f35630cc5..6833c4070d 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -279,9 +279,7 @@ [:& menu-entry {:title (tr "workspace.shape.menu.delete-flow-start") :on-click (do-remove-flow flow)}]))) - (when (and (or (nil? (:shape-ref shape)) - (> (count selected) 1)) - (not= (:type shape) :frame)) + (when (not= (:type shape) :frame) [:* [:& menu-separator] [:& menu-entry {:title (tr "workspace.shape.menu.create-component")