mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Fix text editor v1 focus not being handled correctly (#8942)
This commit is contained in:
parent
6d1a2d449a
commit
bb85b312d6
@ -20,7 +20,7 @@
|
|||||||
- Fix hover on layers [Taiga #13799](https://tree.taiga.io/project/penpot/issue/13799)
|
- Fix hover on layers [Taiga #13799](https://tree.taiga.io/project/penpot/issue/13799)
|
||||||
- Fix highlight after name edition [Taiga #13783](https://tree.taiga.io/project/penpot/issue/13783)
|
- Fix highlight after name edition [Taiga #13783](https://tree.taiga.io/project/penpot/issue/13783)
|
||||||
- Fix id prop on switch component [Taiga #13534](https://tree.taiga.io/project/penpot/issue/13534)
|
- Fix id prop on switch component [Taiga #13534](https://tree.taiga.io/project/penpot/issue/13534)
|
||||||
|
- Fix text editor v1 focus [Taiga #13961](https://tree.taiga.io/project/penpot/issue/13961)
|
||||||
|
|
||||||
## 2.14.2
|
## 2.14.2
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,13 @@
|
|||||||
(effect [_ state _]
|
(effect [_ state _]
|
||||||
(let [editor (:workspace-editor state)
|
(let [editor (:workspace-editor state)
|
||||||
element (when editor (.-element editor))]
|
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)))))))
|
(ts/schedule #(.focus ^js element)))))))
|
||||||
|
|
||||||
(defn gen-name
|
(defn gen-name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user