mirror of
https://github.com/penpot/penpot.git
synced 2026-08-29 16:18:48 +00:00
🐛 Fix incorrect text-edition warning when applying tokens (#9355)
This commit is contained in:
parent
66337f2ab9
commit
ce24fed32b
@ -11,6 +11,7 @@
|
|||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Fix incorrect handling of version restore operation [Github #9041](https://github.com/penpot/penpot/pull/9041)
|
- Fix incorrect handling of version restore operation [Github #9041](https://github.com/penpot/penpot/pull/9041)
|
||||||
|
- Fix false “text editing” warning when applying tokens [Github #6346](https://github.com/penpot/penpot/issues/9346)
|
||||||
|
|
||||||
|
|
||||||
## 2.14.4
|
## 2.14.4
|
||||||
|
|||||||
@ -660,13 +660,11 @@
|
|||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
;; We do not allow to apply tokens while text editor is open.
|
;; We do not allow to apply tokens while text editor is open.
|
||||||
;; The classic text editor sets :workspace-editor-state; the WASM text editor
|
|
||||||
;; does not, so we also check :workspace-local :edition for text shapes.
|
|
||||||
(let [edition (get-in state [:workspace-local :edition])
|
(let [edition (get-in state [:workspace-local :edition])
|
||||||
objects (dsh/lookup-page-objects state)
|
objects (dsh/lookup-page-objects state)
|
||||||
text-editing? (and (some? edition)
|
text-editing? (and (some? edition)
|
||||||
(= :text (:type (get objects edition))))]
|
(= :text (:type (get objects edition))))]
|
||||||
(if (and (empty? (get state :workspace-editor-state))
|
(if (and (some? token)
|
||||||
(not text-editing?))
|
(not text-editing?))
|
||||||
(let [attributes-to-remove
|
(let [attributes-to-remove
|
||||||
;; Remove atomic typography tokens when applying composite and vice-verca
|
;; Remove atomic typography tokens when applying composite and vice-verca
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user