[IMP] web_editor: adding dirtyness check when in collab mode
This commit adds a new event listener on the odooEditor which listens for external history steps (if collab mode is enabled), and changes the state of the record's dirtyness when a user receives external steps. This way a user will see that the record has been modified when he is editing a collaborative html field. task-3609594 closes odoo/odoo#145928 Related: odoo/enterprise#51579 Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
This commit is contained in:
@@ -315,6 +315,12 @@ export class HtmlField extends Component {
|
||||
this.props.record.model.bus.trigger("FIELD_IS_DIRTY", this._isDirty())
|
||||
);
|
||||
|
||||
if (this.props.isCollaborative) {
|
||||
this.wysiwyg.odooEditor.addEventListener("onExternalHistorySteps", () =>
|
||||
this.props.record.model.bus.trigger("FIELD_IS_DIRTY", this._isDirty())
|
||||
);
|
||||
}
|
||||
|
||||
this.isRendered = true;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user