mirror of
https://github.com/penpot/penpot.git
synced 2026-05-09 01:58:46 +00:00
🐛 Fix text editor v1 focus not being handled correctly (#8942)
This commit is contained in:
parent
443fb60743
commit
9c44f5bf65
@ -8,6 +8,7 @@
|
||||
|
||||
- Fix component "broken" after switch variant [Taiga #12984](https://tree.taiga.io/project/penpot/issue/12984)
|
||||
- Fix dashboard navigation tabs overlap with projects content when scrolling [Taiga #13962](https://tree.taiga.io/project/penpot/issue/13962)
|
||||
- Fix text editor v1 focus [Taiga #13961](https://tree.taiga.io/project/penpot/issue/13961)
|
||||
|
||||
|
||||
## 2.14.2
|
||||
|
||||
@ -81,7 +81,13 @@
|
||||
(effect [_ state _]
|
||||
(let [editor (:workspace-editor state)
|
||||
element (when editor (.-element editor))]
|
||||
(when (and element (.-focus element))
|
||||
(cond
|
||||
;; V1 (DraftEditor)
|
||||
(.-focus editor)
|
||||
(ts/schedule #(.focus ^js editor))
|
||||
|
||||
;; V2
|
||||
(and element (.-focus element))
|
||||
(ts/schedule #(.focus ^js element)))))))
|
||||
|
||||
(defn gen-name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user