From 69d53732226abd989b72646a6da6cb7b3afd8ffe Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 6 Feb 2018 11:17:38 -0800 Subject: [PATCH] [fix] Firefox rendering of TextInput Removes UA controls from numeric inputs in Firefox, and makes the default border solid in all browsers. Fix #789 --- .../src/exports/StyleSheet/StyleSheetValidation.js | 6 ++++-- packages/react-native-web/src/exports/TextInput/index.js | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/react-native-web/src/exports/StyleSheet/StyleSheetValidation.js b/packages/react-native-web/src/exports/StyleSheet/StyleSheetValidation.js index 56fed3fc..d2466f9f 100644 --- a/packages/react-native-web/src/exports/StyleSheet/StyleSheetValidation.js +++ b/packages/react-native-web/src/exports/StyleSheet/StyleSheetValidation.js @@ -93,8 +93,10 @@ StyleSheetValidation.addValidStylePropTypes({ cursor: string, fill: string, float: oneOf(['left', 'none', 'right']), - font: string /* @private */, listStyle: string, pointerEvents: string, - tableLayout: string + tableLayout: string, + /* @private */ + MozAppearance: string, + font: string }); diff --git a/packages/react-native-web/src/exports/TextInput/index.js b/packages/react-native-web/src/exports/TextInput/index.js index d22c5e0f..e919c4f4 100644 --- a/packages/react-native-web/src/exports/TextInput/index.js +++ b/packages/react-native-web/src/exports/TextInput/index.js @@ -390,10 +390,12 @@ class TextInput extends Component<*> { const styles = StyleSheet.create({ initial: { + MozAppearance: 'textfield', appearance: 'none', backgroundColor: 'transparent', borderColor: 'black', borderRadius: 0, + borderStyle: 'solid', borderWidth: 0, boxSizing: 'border-box', color: 'inherit',