diff --git a/CHANGES.md b/CHANGES.md index ec8780dfd..37869bc9e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # CHANGELOG +## 1.14.1-beta + +### :bug: Bugs fixed + +- Fix crash when double click on viewer assets [Taiga #3625](https://tree.taiga.io/project/penpot/issue/3625) + ## 1.14.0-beta ### :sparkles: New features @@ -13,6 +19,7 @@ - Navigate to the original link after log in [Taiga #3624](https://tree.taiga.io/project/penpot/issue/3624) ### :bug: Bugs fixed + - Fix menu file not accessible in certain conditions [Taiga #3385](https://tree.taiga.io/project/penpot/issue/3385) - Remove deprecated menu options [Taiga #3333](https://tree.taiga.io/project/penpot/issue/3333) - Prototype connection should be under the rules [Taiga #3384](https://tree.taiga.io/project/penpot/issue/3384) diff --git a/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs b/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs index 4e05ac409..528c3773c 100644 --- a/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs +++ b/frontend/src/app/main/ui/viewer/handoff/left_sidebar.cljs @@ -72,7 +72,7 @@ :icon-layer (= (:type item) :icon)) :on-click select-shape} [:& si/element-icon {:shape item}] - [:& layer-name {:shape item}] + [:& layer-name {:shape item :disabled-double-click true}] (when (and (not disable-collapse?) (:shapes item)) [:span.toggle-content diff --git a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs index e13502999..6b3132217 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs @@ -32,13 +32,14 @@ (l/derived (l/in [:workspace-local :shape-for-rename]) st/state)) (mf/defc layer-name - [{:keys [shape on-start-edit on-stop-edit name-ref] :as props}] + [{:keys [shape on-start-edit disabled-double-click on-stop-edit name-ref] :as props}] (let [local (mf/use-state {}) shape-for-rename (mf/deref shape-for-rename-ref) start-edit (fn [] - (on-start-edit) - (swap! local assoc :edition true)) + (when (not disabled-double-click) + (on-start-edit) + (swap! local assoc :edition true))) accept-edit (fn [] (let [name-input (mf/ref-val name-ref)