mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08: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
@ -189,10 +189,10 @@ export default class MessageEditor extends React.Component {
|
||||
|
||||
// if nothing has changed then bail
|
||||
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["formatted_body"] === newContent["formatted_body"]) {
|
||||
console.log("skipping");
|
||||
oldContent["formatted_body"] === newContent["formatted_body"])) {
|
||||
this._cancelEdit();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user