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

🐛 Fix text editor selection

This commit is contained in:
AzazelN28 2024-11-18 12:41:07 +01:00
parent 1e2d9a15a3
commit 68397edd4d
3 changed files with 5 additions and 4 deletions

View file

@ -115,8 +115,8 @@
(defn calculate-text-values
[shape]
(let [state-map (if (features/active-feature? @st/state "text-editor/v2")
(deref refs/workspace-v2-editor-state)
(deref refs/workspace-editor-state))
(deref refs/workspace-v2-editor-state)
(deref refs/workspace-editor-state))
editor-state (get state-map (:id shape))
editor-instance (when (features/active-feature? @st/state "text-editor/v2")
(deref refs/workspace-editor))]

View file

@ -171,6 +171,7 @@
(and (some? drawing-obj) (= :path (:type drawing-obj))))
node-editing? (and edition (= :path (get-in base-objects [edition :type])))
text-editing? (and edition (= :text (get-in base-objects [edition :type])))
grid-editing? (and edition (ctl/grid-layout? base-objects edition))
mode-inspect? (= options-mode :inspect)

View file

@ -16,7 +16,7 @@
(defn v2-closest-text-editor-content
[target]
(.closest ^js target ".text-editor-content"))
(.closest ^js target "[data-itype=\"editor\"]"))
(defn closest-text-editor-content
[target]
@ -34,7 +34,7 @@
(defn v2-get-text-editor-content
[]
(dom/get-element-by-class "text-editor-content"))
(dom/query "[data-itype=\"editor\"]"))
(defn get-text-editor-content
[]