mirror of
https://github.com/penpot/penpot.git
synced 2026-05-10 10:38:17 +00:00
🐛 Fix focus editor check
This commit is contained in:
parent
200b69fae2
commit
083be7df88
@ -106,8 +106,10 @@
|
||||
(ptk/reify ::focus-editor
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(when-let [editor (:workspace-editor state)]
|
||||
(ts/schedule #(.focus ^js editor))))))
|
||||
(let [editor (:workspace-editor state)
|
||||
element (when editor (.-element editor))]
|
||||
(when (and element (.-focus element))
|
||||
(ts/schedule #(.focus ^js element)))))))
|
||||
|
||||
(defn gen-name
|
||||
[editor]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user