PLT-3056 Fix Unable to type quickly in post textbox in IE11 (#3249)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
c0d1b8fbb9
Коммит
65f51c7bc4
@@ -38,7 +38,7 @@ class EditPostModal extends React.Component {
|
||||
this.handleKeyDown = this.handleKeyDown.bind(this);
|
||||
this.onPreferenceChange = this.onPreferenceChange.bind(this);
|
||||
|
||||
this.state = {editText: '', originalText: '', title: '', post_id: '', channel_id: '', comments: 0, refocusId: ''};
|
||||
this.state = {editText: '', originalText: '', title: '', post_id: '', channel_id: '', comments: 0, refocusId: '', typing: false};
|
||||
}
|
||||
handleEdit() {
|
||||
var updatedPost = {};
|
||||
@@ -78,7 +78,8 @@ class EditPostModal extends React.Component {
|
||||
$('#edit_post').modal('hide');
|
||||
}
|
||||
handleEditInput(editMessage) {
|
||||
this.setState({editText: editMessage});
|
||||
const typing = editMessage !== '';
|
||||
this.setState({editText: editMessage, typing});
|
||||
}
|
||||
handleEditKeyPress(e) {
|
||||
if (!this.state.ctrlSend && e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
|
||||
@@ -99,7 +100,8 @@ class EditPostModal extends React.Component {
|
||||
post_id: options.postId || '',
|
||||
channel_id: options.channelId || '',
|
||||
comments: options.comments || 0,
|
||||
refocusId: options.refocusId || ''
|
||||
refocusId: options.refocusId || '',
|
||||
typing: false
|
||||
});
|
||||
|
||||
$(ReactDOM.findDOMNode(this.refs.modal)).modal('show');
|
||||
@@ -118,7 +120,7 @@ class EditPostModal extends React.Component {
|
||||
var self = this;
|
||||
|
||||
$(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', () => {
|
||||
self.setState({editText: '', originalText: '', title: '', channel_id: '', post_id: '', comments: 0, refocusId: '', error: ''});
|
||||
self.setState({editText: '', originalText: '', title: '', channel_id: '', post_id: '', comments: 0, refocusId: '', error: '', typing: false});
|
||||
});
|
||||
|
||||
$(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', (e) => {
|
||||
@@ -133,7 +135,8 @@ class EditPostModal extends React.Component {
|
||||
channel_id: $(button).attr('data-channelid'),
|
||||
post_id: $(button).attr('data-postid'),
|
||||
comments: $(button).attr('data-comments'),
|
||||
refocusId: $(button).attr('data-refocusid')
|
||||
refocusId: $(button).attr('data-refocusid'),
|
||||
typing: false
|
||||
});
|
||||
});
|
||||
|
||||
@@ -199,6 +202,7 @@ class EditPostModal extends React.Component {
|
||||
onKeyPress={this.handleEditKeyPress}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
messageText={this.state.editText}
|
||||
typing={this.state.typing}
|
||||
createMessage={this.props.intl.formatMessage(holders.editPost)}
|
||||
supportsCommands={false}
|
||||
id='edit_textbox'
|
||||
|
||||
Ссылка в новой задаче
Block a user