From e563611c058436bffc7b4ccc3fe24af519f6ef7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 7 Jul 2023 10:21:07 +0200 Subject: [PATCH] :bug: Fix overlay close from an artboard --- CHANGES.md | 1 + frontend/src/app/main/ui/viewer/shapes.cljs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d09d084ae..6d7acc4a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -64,6 +64,7 @@ - Fix border radius values with decimals [Taiga #5283](https://tree.taiga.io/project/penpot/issue/5283) - Fix shortcuts translations not homogenized [Taiga #5141](https://tree.taiga.io/project/penpot/issue/5141) - Fix overlay manual position in nested boards [Taiga #5135](https://tree.taiga.io/project/penpot/issue/5135) +- Fix close overlay from a nested board [Taiga #5587](https://tree.taiga.io/project/penpot/issue/5587) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/viewer/shapes.cljs b/frontend/src/app/main/ui/viewer/shapes.cljs index 4d279cd0f..7131bc88c 100644 --- a/frontend/src/app/main/ui/viewer/shapes.cljs +++ b/frontend/src/app/main/ui/viewer/shapes.cljs @@ -110,7 +110,8 @@ :close-overlay (let [dest-frame-id (or (:destination interaction) - (if (= (:type shape) :frame) + (if (and (= (:type shape) :frame) + (some #(= (:id %) (:id shape)) overlays)) (:id shape) (:frame-id shape)))] (st/emit! (dv/close-overlay dest-frame-id (:animation interaction))))