mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 01:16:11 +02:00
Minor fix on layers sidebar event handling.
This commit is contained in:
parent
366fdbd067
commit
3584c1f59a
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
||||||
[uxbox.main.ui.shapes.icon :as icon]
|
[uxbox.main.ui.shapes.icon :as icon]
|
||||||
[uxbox.main.ui.workspace.base :as wb]
|
[uxbox.main.ui.workspace.base :as wb]
|
||||||
[uxbox.main.ui.icons :as i]
|
[uxbox.main.ui.icons :as i]
|
||||||
|
[uxbox.main.ui.keyboard :as kbd]
|
||||||
[uxbox.util.mixins :as mx]
|
[uxbox.util.mixins :as mx]
|
||||||
[uxbox.util.dom.dnd :as dnd]
|
[uxbox.util.dom.dnd :as dnd]
|
||||||
[uxbox.util.dom :as dom])
|
[uxbox.util.dom :as dom])
|
||||||
|
@ -126,6 +127,10 @@
|
||||||
(set! (.-draggable parent) true)
|
(set! (.-draggable parent) true)
|
||||||
(rs/emit! (uds/update-shape data))
|
(rs/emit! (uds/update-shape data))
|
||||||
(swap! local assoc :edition false)))
|
(swap! local assoc :edition false)))
|
||||||
|
(on-key-down [event]
|
||||||
|
(js/console.log event)
|
||||||
|
(when (kbd/enter? event)
|
||||||
|
(on-blur event)))
|
||||||
(on-click [event]
|
(on-click [event]
|
||||||
(dom/stop-propagation event)
|
(dom/stop-propagation event)
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
|
@ -136,6 +141,7 @@
|
||||||
[:input.element-name
|
[:input.element-name
|
||||||
{:type "text"
|
{:type "text"
|
||||||
:on-blur on-blur
|
:on-blur on-blur
|
||||||
|
:on-key-down on-key-down
|
||||||
:auto-focus true
|
:auto-focus true
|
||||||
:default-value (:name shape "")}]
|
:default-value (:name shape "")}]
|
||||||
[:span.element-name
|
[:span.element-name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue