diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-16 09:12:30 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-16 09:12:30 -0700 |
commit | 8b2d7f391aedeb5d6bd6490b92bdadf5050e1c73 (patch) | |
tree | 84e426d92eccf017f0fd5ccd22815a2139bd6e44 /web/react/components/textbox.jsx | |
parent | 6a1755d2e32c3f3bcaa67c33f32cb5eb5ab76ea2 (diff) | |
parent | 9c045f0d4bdf254f57b94356fd2f5f2a2408ed03 (diff) | |
download | chat-8b2d7f391aedeb5d6bd6490b92bdadf5050e1c73.tar.gz chat-8b2d7f391aedeb5d6bd6490b92bdadf5050e1c73.tar.bz2 chat-8b2d7f391aedeb5d6bd6490b92bdadf5050e1c73.zip |
Fixing merge
Diffstat (limited to 'web/react/components/textbox.jsx')
-rw-r--r-- | web/react/components/textbox.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx index d51fb9523..86bb42f62 100644 --- a/web/react/components/textbox.jsx +++ b/web/react/components/textbox.jsx @@ -9,6 +9,7 @@ const ErrorStore = require('../stores/error_store.jsx'); const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const ActionTypes = Constants.ActionTypes; +const KeyCodes = Constants.KeyCodes; export default class Textbox extends React.Component { constructor(props) { @@ -148,8 +149,10 @@ export default class Textbox extends React.Component { this.doProcessMentions = true; } - if (e.keyCode === 8) { + if (e.keyCode === KeyCodes.BACKSPACE) { this.handleBackspace(e); + } else if (this.props.onKeyDown) { + this.props.onKeyDown(e); } } @@ -318,5 +321,6 @@ Textbox.propTypes = { onUserInput: React.PropTypes.func.isRequired, onKeyPress: React.PropTypes.func.isRequired, onHeightChange: React.PropTypes.func, - createMessage: React.PropTypes.string.isRequired + createMessage: React.PropTypes.string.isRequired, + onKeyDown: React.PropTypes.func }; |