Cursor is moved to command box instead of parameter box if edit phone from profile [ui-refresh] (#998)

This commit is contained in:
alwx 2017-04-15 11:58:11 +03:00 committed by Roman Volosovskyi
parent 10cce42403
commit 4633a23c17
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@
:text-align-vertical :center
:height min-input-height
:align-items :center
:android {:left (+ 15 left)
:android {:left (+ 10 left)
:top 0.5}
:ios {:line-height min-input-height
:left (+ 9 left)}})

View File

@ -79,8 +79,8 @@
(set-layout-height h))
:on-selection-change #(let [s (-> (.-nativeEvent %)
(.-selection))]
(when (and (= (.-end s) 10)
(get command [:command :sequential-params]))
(when (and (= (.-end s) (+ 2 (count (get-in @command [:command :name]))))
(get-in @command [:command :sequential-params]))
(dispatch [:chat-input-focus :seq-input-ref])))
:on-submit-editing #(dispatch [:send-current-message])
:on-focus #(do (dispatch [:set-chat-ui-props :input-focused? true])