From 3d09252bb16467c55ed8f8b38d0badb5b384a25f Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Tue, 28 Aug 2018 11:28:41 +0300 Subject: [PATCH 1/2] Fix desktop signin text input field --- src/status_im/ui/components/text_input/view.cljs | 6 ++++-- 1 file changed, 4 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 ccce3341f7..5fa1383528 100644 --- a/src/status_im/ui/components/text_input/view.cljs +++ b/src/status_im/ui/components/text_input/view.cljs @@ -2,6 +2,7 @@ (:require [status-im.ui.components.react :as react] [status-im.ui.components.text-input.styles :as styles] [status-im.ui.components.colors :as colors] + [status-im.utils.platform :as platform] [status-im.ui.components.tooltip.views :as tooltip])) (defn text-input-with-label [{:keys [label content error style height container text] :as props}] @@ -15,9 +16,10 @@ {:style (merge styles/input style) :placeholder-text-color colors/gray :auto-focus true - :value text :auto-capitalize :none} - (dissoc props :style :height))] + (dissoc props :style :height) + (when-not platform/desktop? + {:value text}))] (when content content)] (when error [tooltip/tooltip error (styles/error label)])]) From 6e2a2ca1b3f82072e065692d2a4ba2168a4d8c52 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Tue, 28 Aug 2018 13:31:15 +0300 Subject: [PATCH 2/2] Add comment describing the rationale for the workaround --- src/status_im/ui/components/text_input/view.cljs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/status_im/ui/components/text_input/view.cljs b/src/status_im/ui/components/text_input/view.cljs index 5fa1383528..f08386e15e 100644 --- a/src/status_im/ui/components/text_input/view.cljs +++ b/src/status_im/ui/components/text_input/view.cljs @@ -18,6 +18,8 @@ :auto-focus true :auto-capitalize :none} (dissoc props :style :height) + ;; Workaround until `value` TextInput field is available on desktop: + ;; https://github.com/status-im/react-native-desktop/issues/320 (when-not platform/desktop? {:value text}))] (when content content)]