diff --git a/.re-natal b/.re-natal index 8fd652b4ea..5d64a66c9d 100644 --- a/.re-natal +++ b/.re-natal @@ -13,7 +13,8 @@ "react-native-action-button", "react-native-vector-icons/Ionicons", "react-native-circle-checkbox", - "react-native-randombytes" + "react-native-randombytes", + "dismissKeyboard" ], "imageDirs": [ "images" diff --git a/src/syng_im/components/chat/plain_message_input.cljs b/src/syng_im/components/chat/plain_message_input.cljs index 74c8cd2c83..0e230bbcd8 100644 --- a/src/syng_im/components/chat/plain_message_input.cljs +++ b/src/syng_im/components/chat/plain_message_input.cljs @@ -4,7 +4,8 @@ view image touchable-highlight - text-input]] + text-input + dismiss-keyboard]] [syng-im.components.styles :refer [font text2-color color-white @@ -25,7 +26,8 @@ input-message]) (dispatch [:send-chat-msg chat-id input-message]))) - (set-input-message nil)) + (set-input-message nil) + (dismiss-keyboard)) (defn plain-message-input-view [] (let [chat (subscribe [:get-current-chat]) diff --git a/src/syng_im/components/react.cljs b/src/syng_im/components/react.cljs index a9f31957b7..b3b047b0b8 100644 --- a/src/syng_im/components/react.cljs +++ b/src/syng_im/components/react.cljs @@ -20,6 +20,8 @@ (defn list-item [component] (r/as-element component)) +(def dismiss-keyboard (js/require "dismissKeyboard")) + (comment (.-width (.get (.. js/React -Dimensions) "window")) )