diff --git a/CHANGES.md b/CHANGES.md index a40f79448..dfe3d10d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ ### :bug: Bugs fixed - Fix issue with guides over shape handlers [Taiga #3032](https://tree.taiga.io/project/penpot/issue/3032) +- Fix problem with shift+ctrl+click to select [#1671](https://github.com/penpot/penpot/issues/1671) ## 1.12.1-beta diff --git a/frontend/src/app/main/ui/workspace/viewport/actions.cljs b/frontend/src/app/main/ui/workspace/viewport/actions.cljs index 0d6ca0ba8..cc2a2c5b4 100644 --- a/frontend/src/app/main/ui/workspace/viewport/actions.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/actions.cljs @@ -160,14 +160,13 @@ (st/emit! (ms/->MouseEvent :click ctrl? shift? alt?)) (when (and hovering? - (not shift?) - (or ctrl? (not frame?)) + (or (not frame?) ctrl?) (not @space?) (not selected?) (not edition) (not drawing-path?) (not drawing-tool)) - (st/emit! (dw/select-shape (:id @hover))))))))) + (st/emit! (dw/select-shape (:id @hover) shift?)))))))) (defn on-double-click [hover hover-ids drawing-path? objects edition] diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 81a9352ba..f9b7ca0c2 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -170,7 +170,7 @@ (hooks/use-stream over-shapes-stream - (mf/deps page-id objects @ctrl?) + (mf/deps page-id objects) (fn [ids] (let [is-group? (fn [id] @@ -178,15 +178,17 @@ selected (mf/ref-val selected-ref) + ctrl? (mf/ref-val ctrl-ref) + remove-xfm (mapcat #(cph/get-parent-ids objects %)) remove-id? (cond-> (into #{} remove-xfm selected) :always (into (filter #(check-text-collision? objects (mf/ref-val raw-position-ref) %)) ids) - (not @ctrl?) + (not ctrl?) (into (filter #(group-empty-space? % objects ids)) ids) - @ctrl? + ctrl? (into (filter is-group?) ids)) hover-shape (->> ids