mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-18 14:21:55 +03:00
take dirty-flag into account for editing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
bf9353f3af
commit
e591d3ef76
1 changed files with 3 additions and 3 deletions
|
@ -189,10 +189,10 @@ export default class MessageEditor extends React.Component {
|
||||||
|
|
||||||
// if nothing has changed then bail
|
// if nothing has changed then bail
|
||||||
const oldContent = this.props.editState.getEvent().getContent();
|
const oldContent = this.props.editState.getEvent().getContent();
|
||||||
if (oldContent["msgtype"] === newContent["msgtype"] && oldContent["body"] === newContent["body"] &&
|
if (!this._hasModifications ||
|
||||||
|
(oldContent["msgtype"] === newContent["msgtype"] && oldContent["body"] === newContent["body"] &&
|
||||||
oldContent["format"] === newContent["format"] &&
|
oldContent["format"] === newContent["format"] &&
|
||||||
oldContent["formatted_body"] === newContent["formatted_body"]) {
|
oldContent["formatted_body"] === newContent["formatted_body"])) {
|
||||||
console.log("skipping");
|
|
||||||
this._cancelEdit();
|
this._cancelEdit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue