0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

Merge pull request #5331 from penpot/alotor-exit-comments

🐛 Fix escape key to exit comments mode
This commit is contained in:
Andrey Antukh 2024-11-19 10:59:13 +01:00 committed by GitHub
commit a91737b4d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,7 @@
[app.main.data.changes :as dch]
[app.main.data.comments :as dcm]
[app.main.data.events :as ev]
[app.main.data.workspace :as dw]
[app.main.data.workspace.common :as dwco]
[app.main.data.workspace.drawing :as dwd]
[app.main.data.workspace.state-helpers :as wsh]
@ -60,7 +61,11 @@
(let [local (:comments-local state)]
(cond
(:draft local) (rx/of (dcm/close-thread))
(:open local) (rx/of (dcm/close-thread)))))))
(:open local) (rx/of (dcm/close-thread))
:else
(rx/of (dw/clear-edition-mode)
(dw/deselect-all true)))))))
;; Event responsible of the what should be executed when user clicked
;; on the comments layer. An option can be create a new draft thread,