PLT-4084 Fix Unable to send messages in RC (#3983)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
dde7b50adf
Коммит
c99db74390
@@ -26,6 +26,7 @@ export default class Textbox extends React.Component {
|
||||
this.focus = this.focus.bind(this);
|
||||
this.getStateFromStores = this.getStateFromStores.bind(this);
|
||||
this.onRecievedError = this.onRecievedError.bind(this);
|
||||
this.handleKeyPress = this.handleKeyPress.bind(this);
|
||||
this.handleKeyDown = this.handleKeyDown.bind(this);
|
||||
this.handleHeightChange = this.handleHeightChange.bind(this);
|
||||
this.showPreview = this.showPreview.bind(this);
|
||||
@@ -68,8 +69,14 @@ export default class Textbox extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
handleKeyPress(e) {
|
||||
this.props.onKeyPress(e);
|
||||
}
|
||||
|
||||
handleKeyDown(e) {
|
||||
this.props.onKeyDown(e);
|
||||
if (this.props.onKeyDown) {
|
||||
this.props.onKeyDown(e);
|
||||
}
|
||||
}
|
||||
|
||||
handleHeightChange(height) {
|
||||
@@ -183,6 +190,7 @@ export default class Textbox extends React.Component {
|
||||
maxLength={Constants.MAX_POST_LEN}
|
||||
placeholder={this.props.createMessage}
|
||||
onInput={this.props.onInput}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
onHeightChange={this.handleHeightChange}
|
||||
style={{visibility: this.state.preview ? 'hidden' : 'visible'}}
|
||||
@@ -227,7 +235,8 @@ Textbox.propTypes = {
|
||||
channelId: React.PropTypes.string,
|
||||
messageText: React.PropTypes.string.isRequired,
|
||||
onInput: React.PropTypes.func.isRequired,
|
||||
onKeyPress: React.PropTypes.func.isRequired,
|
||||
createMessage: React.PropTypes.string.isRequired,
|
||||
onKeyDown: React.PropTypes.func.isRequired,
|
||||
onKeyDown: React.PropTypes.func,
|
||||
supportsCommands: React.PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user