From 6a732570c726481685242dd505e4632c0f0b1f8b Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 26 Sep 2019 14:39:50 +0200 Subject: [PATCH] [#9034] Turn off autosuggestion on seedphrase confirmation input Signed-off-by: Andrey Shovkoplyas --- src/status_im/ui/components/text_input/view.cljs | 10 ++++++++-- src/status_im/ui/screens/profile/seed/views.cljs | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/status_im/ui/components/text_input/view.cljs b/src/status_im/ui/components/text_input/view.cljs index 88ed7ea3c2..9c213db9df 100644 --- a/src/status_im/ui/components/text_input/view.cljs +++ b/src/status_im/ui/components/text_input/view.cljs @@ -14,7 +14,10 @@ (dissoc merged-styles :background-color) merged-styles))) -(defn text-input-with-label [{:keys [label content error style height container text editable] :as props :or {editable true}}] +(defn text-input-with-label + [{:keys [label content error style height container text editable keyboard-type] + :as props + :or {editable true}}] [react/view (when label [react/text {:style (styles/label editable)} @@ -26,7 +29,10 @@ :placeholder-text-color colors/gray :auto-focus true :auto-capitalize :none} - (dissoc props :style :height) + (cond-> (dissoc props :style :height) + ;; error on ios + (and platform/ios? (= keyboard-type "visible-password")) + (dissoc :keyboard-type)) ;; Workaround until `value` TextInput field is available on desktop: ;; https://github.com/status-im/react-native-desktop/issues/320 (when-not platform/desktop? diff --git a/src/status_im/ui/screens/profile/seed/views.cljs b/src/status_im/ui/screens/profile/seed/views.cljs index d4495c0651..5c70152642 100644 --- a/src/status_im/ui/screens/profile/seed/views.cljs +++ b/src/status_im/ui/screens/profile/seed/views.cljs @@ -89,6 +89,8 @@ {:placeholder (i18n/label :t/enter-word) :ref (partial reset! ref) :auto-focus true + :auto-correct false + :keyboard-type "visible-password" :on-change-text #(re-frame/dispatch [:set-in [:my-profile/seed :word] %]) :on-submit-editing next-handler :error error}]))