diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index 03dd1de0e..08267fb8c 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -116,8 +116,8 @@ class PostTextbox extends PureComponent { this.refs.input.blur(); }; - handleContentSizeChange = (e) => { - let height = e.nativeEvent.contentSize.height; + handleContentSizeChange = (h) => { + let height = h; if (height < INITIAL_HEIGHT) { height = INITIAL_HEIGHT; } @@ -218,6 +218,10 @@ class PostTextbox extends PureComponent { } }; + initialHeight = (event) => { + this.handleContentSizeChange(event.nativeEvent.layout.height); + }; + attachAutocomplete = (c) => { this.autocomplete = c; }; @@ -390,6 +394,12 @@ class PostTextbox extends PureComponent { return ( + + {textValue} + {this.state.canSend && { paddingTop: 8, textAlignVertical: 'top' }, + hidden: { + position: 'absolute', + top: 10000, // way off screen + left: 10000, // way off screen + backgroundColor: 'transparent', + borderColor: 'transparent', + color: 'transparent' + }, inputContainer: { flex: 1, flexDirection: 'row',