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:
parent
1e2d9a15a3
commit
68397edd4d
3 changed files with 5 additions and 4 deletions
|
@ -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))]
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
[]
|
||||
|
|
Loading…
Reference in a new issue