Permalink
Browse files

Forcing to `alignSelf: stretch` was removed from <TextInput>

Summary:
Because it introduces inconsistency in RN layout model, confuses people and hurts dev experience.
The original problem was introduced in D1611014 as an attempt to address the intrinsic size issue.
So, now <TextInput> has intrinsic size (D5069971) and we don't need this hack anymore.

GH issues:
#11892
#9646

Reviewed By: javache

Differential Revision: D5072833

fbshipit-source-id: d9a60ab09b728e6de89bfa53eda07069377f1369
  • Loading branch information...
shergin authored and facebook-github-bot committed May 29, 2017
1 parent 44af4d1 commit 4e4052162042fc26fe17cc4eb2e2deb28a5344fa
Showing with 1 addition and 4 deletions.
  1. +1 −4 Libraries/Components/TextInput/TextInput.js
@@ -628,7 +628,7 @@ const TextInput = React.createClass({
var textContainer;
var props = Object.assign({}, this.props);
props.style = [styles.input, this.props.style];
props.style = [this.props.style];
if (props.selection && props.selection.end == null) {
props.selection = {start: props.selection.start, end: props.selection.start};
@@ -859,9 +859,6 @@ const TextInput = React.createClass({
});
var styles = StyleSheet.create({
input: {
alignSelf: 'stretch',
},
multilineInput: {
// This default top inset makes RCTTextView seem as close as possible
// to single-line RCTTextField defaults, using the system defaults

0 comments on commit 4e40521

Please sign in to comment.