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.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/components/textbox.jsx b/webapp/components/textbox.jsx
index 4a4a854f3..f11ef20ad 100644
--- a/webapp/components/textbox.jsx
+++ b/webapp/components/textbox.jsx
@@ -29,6 +29,7 @@ export default class Textbox extends React.Component {
this.onRecievedError = this.onRecievedError.bind(this);
this.handleKeyPress = this.handleKeyPress.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
+ this.handleBlur = this.handleBlur.bind(this);
this.handleHeightChange = this.handleHeightChange.bind(this);
this.showPreview = this.showPreview.bind(this);
@@ -84,6 +85,12 @@ export default class Textbox extends React.Component {
}
}
+ handleBlur(e) {
+ if (this.props.onBlur) {
+ this.props.onBlur(e);
+ }
+ }
+
handleHeightChange(height) {
const textbox = $(this.refs.message.getTextbox());
const wrapper = $(this.refs.wrapper);
@@ -209,6 +216,7 @@ export default class Textbox extends React.Component {
onChange={this.props.onChange}
onKeyPress={this.handleKeyPress}
onKeyDown={this.handleKeyDown}
+ onBlur={this.handleBlur}
onHeightChange={this.handleHeightChange}
style={{visibility: this.state.preview ? 'hidden' : 'visible'}}
listComponent={SuggestionList}
@@ -255,5 +263,6 @@ Textbox.propTypes = {
onKeyPress: React.PropTypes.func.isRequired,
createMessage: React.PropTypes.string.isRequired,
onKeyDown: React.PropTypes.func,
+ onBlur: React.PropTypes.func,
supportsCommands: React.PropTypes.bool.isRequired
};