Merge pull request #3459 from matrix-org/t3chguy/editing_enable_onPaste

Fix disabled save button on message editor when pasting
pull/21833/head
Michael Telatynski 2019-09-19 09:26:50 +01:00 committed by GitHub
commit 1a330374fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -179,6 +179,7 @@ export default class BasicMessageEditor extends React.Component {
const {partCreator} = model;
const text = event.clipboardData.getData("text/plain");
if (text) {
this._modifiedFlag = true;
const range = getRangeForSelection(this._editorRef, model, document.getSelection());
const parts = parsePlainTextMessage(text, partCreator);
replaceRangeAndMoveCaret(range, parts);