0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 fix enter key as a way to exit path editing mode

This commit is contained in:
eva 2022-01-05 12:41:41 +01:00 committed by Alonso Torres
parent f5cfbce1c2
commit 16c4116c15
3 changed files with 4 additions and 7 deletions

View file

@ -17,6 +17,7 @@
### :bug: Bugs fixed
- Fix Enter as key action to exit edit path [Taiga #2444](https://tree.taiga.io/project/penpot/issue/2444).
- Fix add fill color from palette to groups and components [Taiga #2313](https://tree.taiga.io/project/penpot/issue/2313).
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280).
- Fix line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381).

View file

@ -635,7 +635,7 @@
objects (wsh/lookup-page-objects state page-id)
shapes (cp/select-toplevel-shapes objects {:include-frames? true})
srect (gsh/selection-rect shapes)]
(if (= 0 (count shapes))
(if (empty? shapes)
state
(update state :workspace-local
(fn [{:keys [vport] :as local}]

View file

@ -28,7 +28,7 @@
(get-in state [:workspace-local :edition]))
path-edit-mode (get-in state [:workspace-local :edit-path edition-id :edit-mode])]
(if-not (= :draw path-edit-mode)
(rx/of :interrupt (dw/deselect-all true))
(rx/of :interrupt)
(rx/empty))))))
(def shortcuts
@ -73,13 +73,9 @@
:fn #(st/emit! (drp/toggle-snap))}
:escape {:tooltip (ds/esc)
:command "escape"
:command ["escape" "enter"]
:fn #(st/emit! (esc-pressed))}
:start-editing {:tooltip (ds/enter)
:command "enter"
:fn #(st/emit! (dw/start-editing-selected))}
:undo {:tooltip (ds/meta "Z")
:command (ds/c-mod "z")
:fn #(st/emit! (drp/undo-path))}