Fix ctrl+enter not submitting toot when text cursor is composing image description (#8273)
This commit is contained in:
parent
298ee84488
commit
7a0f781aa9
2 changed files with 18 additions and 0 deletions
|
@ -2,6 +2,7 @@ import { connect } from 'react-redux';
|
|||
import Upload from '../components/upload';
|
||||
import { undoUploadCompose, changeUploadCompose } from '../../../actions/compose';
|
||||
import { openModal } from '../../../actions/modal';
|
||||
import { submitCompose } from '../../../actions/compose';
|
||||
|
||||
const mapStateToProps = (state, { id }) => ({
|
||||
media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),
|
||||
|
@ -21,6 +22,10 @@ const mapDispatchToProps = dispatch => ({
|
|||
dispatch(openModal('FOCAL_POINT', { id }));
|
||||
},
|
||||
|
||||
onSubmit () {
|
||||
dispatch(submitCompose());
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Upload);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue