[FIX] web_editor: fix FIELD_IS_DIRTY notification on historystep
Fixes an issue introduced in a forward-port: https://github.com/odoo/odoo/commit/db0c092973f480f3336a44e5f6868dc5a79f0e3a The listener was not set on the correct target, `historyStep` event is triggered on `odooEditor` and not `odooEditor.editable`. This meant that the FormStatusIndicator was not properly notified and the `save/discard` button was not visible after an editor `historyStep` on form views task-3373603 closes odoo/odoo#126006 X-original-commit: f76585530d7387ff2f44639252829aa4546cea1b Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -337,7 +337,7 @@ export class HtmlField extends Component {
|
||||
this.wysiwyg.toolbar.$el.append($codeviewButtonToolbar);
|
||||
$codeviewButtonToolbar.click(this.toggleCodeView.bind(this));
|
||||
}
|
||||
this.wysiwyg.odooEditor.editable.addEventListener("historyStep", () =>
|
||||
this.wysiwyg.odooEditor.addEventListener("historyStep", () =>
|
||||
this.props.record.model.bus.trigger("FIELD_IS_DIRTY", this._isDirty())
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user