summaryrefslogtreecommitdiffstats
path: root/webapp/components/textbox.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/textbox.jsx')
-rw-r--r--webapp/components/textbox.jsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/webapp/components/textbox.jsx b/webapp/components/textbox.jsx
index 7f5ecea09..41db38837 100644
--- a/webapp/components/textbox.jsx
+++ b/webapp/components/textbox.jsx
@@ -176,6 +176,11 @@ export default class Textbox extends React.Component {
</div>
);
+ const otherProps = {};
+ if (!this.props.typing) {
+ otherProps.value = this.props.messageText;
+ }
+
return (
<div
ref='wrapper'
@@ -189,7 +194,6 @@ export default class Textbox extends React.Component {
spellCheck='true'
maxLength={Constants.MAX_POST_LEN}
placeholder={this.props.createMessage}
- value={this.props.messageText}
onUserInput={this.props.onUserInput}
onKeyPress={this.handleKeyPress}
onKeyDown={this.handleKeyDown}
@@ -198,6 +202,7 @@ export default class Textbox extends React.Component {
listComponent={SuggestionList}
providers={this.suggestionProviders}
channelId={this.props.channelId}
+ {...otherProps}
/>
<div
ref='preview'
@@ -238,5 +243,6 @@ Textbox.propTypes = {
onKeyPress: React.PropTypes.func.isRequired,
createMessage: React.PropTypes.string.isRequired,
onKeyDown: React.PropTypes.func,
- supportsCommands: React.PropTypes.bool.isRequired
+ supportsCommands: React.PropTypes.bool.isRequired,
+ typing: React.PropTypes.bool.isRequired
};