Added code to refocus on the post/comment textbox after a file is drag and dropped
Этот коммит содержится в:
@@ -229,6 +229,10 @@ class CreateComment extends React.Component {
|
|||||||
PostStore.storeCommentDraft(this.props.rootId, draft);
|
PostStore.storeCommentDraft(this.props.rootId, draft);
|
||||||
|
|
||||||
this.setState({uploadsInProgress: draft.uploadsInProgress});
|
this.setState({uploadsInProgress: draft.uploadsInProgress});
|
||||||
|
|
||||||
|
// this is a bit redundant with the code that sets focus when the file input is clicked,
|
||||||
|
// but this also resets the focus after a drag and drop
|
||||||
|
this.refs.textbox.focus();
|
||||||
}
|
}
|
||||||
handleFileUploadComplete(filenames, clientIds) {
|
handleFileUploadComplete(filenames, clientIds) {
|
||||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||||
|
|||||||
@@ -230,6 +230,10 @@ class CreatePost extends React.Component {
|
|||||||
PostStore.storeDraft(channelId, draft);
|
PostStore.storeDraft(channelId, draft);
|
||||||
|
|
||||||
this.setState({uploadsInProgress: draft.uploadsInProgress});
|
this.setState({uploadsInProgress: draft.uploadsInProgress});
|
||||||
|
|
||||||
|
// this is a bit redundant with the code that sets focus when the file input is clicked,
|
||||||
|
// but this also resets the focus after a drag and drop
|
||||||
|
this.refs.textbox.focus();
|
||||||
}
|
}
|
||||||
handleFileUploadComplete(filenames, clientIds, channelId) {
|
handleFileUploadComplete(filenames, clientIds, channelId) {
|
||||||
const draft = PostStore.getDraft(channelId);
|
const draft = PostStore.getDraft(channelId);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user