summaryrefslogtreecommitdiffstats
path: root/web/react/components/textbox.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-08-24 20:47:27 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-08-25 09:40:08 -0700
commit5766bbfc65e3f6663737da5d15359d68e3f991ff (patch)
treebb0054d170534710b49bf02413b3205790c7ac15 /web/react/components/textbox.jsx
parentb4ee26373042d2c5ab422a4955022fb278cb8fa1 (diff)
downloadchat-5766bbfc65e3f6663737da5d15359d68e3f991ff.tar.gz
chat-5766bbfc65e3f6663737da5d15359d68e3f991ff.tar.bz2
chat-5766bbfc65e3f6663737da5d15359d68e3f991ff.zip
Prevents users from typing more than 4000 characters into any 'textbox' (posts, comments, and post/comment edits). Also adds new error message for when users hit exactly 4000 characters so they know the limit.
Diffstat (limited to 'web/react/components/textbox.jsx')
-rw-r--r--web/react/components/textbox.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index b5c5cc564..efd2dd810 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -257,7 +257,7 @@ module.exports = React.createClass({
return (
<div ref='wrapper' className='textarea-wrapper'>
<CommandList ref='commands' addCommand={this.addCommand} channelId={this.props.channelId} />
- <textarea id={this.props.id} ref='message' className={'form-control custom-textarea ' + this.state.connection} spellCheck='true' autoComplete='off' autoCorrect='off' rows='1' placeholder={this.props.createMessage} value={this.props.messageText} onInput={this.handleChange} onChange={this.handleChange} onKeyPress={this.handleKeyPress} onKeyDown={this.handleKeyDown} onFocus={this.handleFocus} onBlur={this.handleBlur} onPaste={this.handlePaste} />
+ <textarea id={this.props.id} ref='message' className={'form-control custom-textarea ' + this.state.connection} spellCheck='true' autoComplete='off' autoCorrect='off' rows='1' maxLength={Constants.MAX_POST_LEN} placeholder={this.props.createMessage} value={this.props.messageText} onInput={this.handleChange} onChange={this.handleChange} onKeyPress={this.handleKeyPress} onKeyDown={this.handleKeyDown} onFocus={this.handleFocus} onBlur={this.handleBlur} onPaste={this.handlePaste} />
</div>
);
}