From 6d41d36b3a7a89df5b289340da661f0dc88c8de0 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Fri, 4 Jul 2025 09:01:20 +0200 Subject: [PATCH] :bug: Fix problem when double click on hidden shapes (#6833) --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/viewport/hooks.cljs | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index aedaad7ed2..8b300a48dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -39,6 +39,7 @@ on-premises instances** that want to keep up to date. - Update google fonts (at 2025/05/19) [Taiga 10792](https://tree.taiga.io/project/penpot/us/10792) - Add tooltip component to DS [Taiga 9220](https://tree.taiga.io/project/penpot/us/9220) - Allow multi file token export [Taiga #10144](https://tree.taiga.io/project/penpot/us/10144) +- Fix problem when double click on hidden shapes [Taiga #11314](https://tree.taiga.io/project/penpot/issue/11314) ### :bug: Bugs fixed diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 23ab6e11da..0551cde8fe 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -286,7 +286,8 @@ (fn [mod? ids] (let [sorted-ids (into (d/ordered-set) - (comp (remove #(dm/get-in objects [% :blocked])) + (comp (remove (partial cfh/hidden-parent? objects)) + (remove #(dm/get-in objects [% :blocked])) (remove (partial cfh/svg-raw-shape? objects))) (ctt/sort-z-index objects ids {:bottom-frames? mod?}))] (mf/set-ref-val! sorted-ids-cache (assoc cached-ids [mod? ids] sorted-ids)) @@ -355,7 +356,6 @@ hover-shape (->> ids (remove remove-hover?) - (remove (partial cfh/hidden-parent? objects)) (remove #(and mod? (no-fill-nested-frames? %))) (filter #(or (empty? focus) (cpf/is-in-focus? objects focus %))) (first) @@ -366,7 +366,6 @@ (when show-measures? (->> ids (remove remove-measure?) - (remove (partial cfh/hidden-parent? objects)) (remove #(and mod? (no-fill-nested-frames? %))) (filter #(or (empty? focus) (cpf/is-in-focus? objects focus %))) (first)