🐛 Fixes problem with chinese inputs

This commit is contained in:
alonso.torres 2021-02-17 13:37:53 +01:00 committed by Andrey Antukh
parent 043c038dae
commit 803caf6531

View file

@ -222,6 +222,11 @@
(fn [event]
(dwt/editor-select-all! editor))
on-composition-start
(mf/use-callback
(fn []
(.insertText slate/Editor editor "")))
on-change
(mf/use-callback
(fn [val]
@ -263,6 +268,7 @@
(dom/stop-propagation event)
;; WARN: monky patch
(obj/set! slate/Transforms "deselect" (constantly nil)))
:on-composition-start on-composition-start
:placeholder (when (= :fixed grow-type) "Type some text here...")}]]]))
(mf/defc text-shape-edit