Skip to content

Commit bf45295

Browse files
committed
[FIX] web_editor: prevent adding data-last-history-step to history
Before this commit, the mutation that add `data-last-history-step` was added to the history. Without the collaboration, it would not be problematic but when the collaboration is activated, that step is broadcasted to the other peers but shouldn't as the mutation is considered to be technical and should not be included into the undo/redo mechanism. task-3217719 Part-of: odoo#114481
1 parent bd2770d commit bf45295

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/web_editor/static/src/js/wysiwyg/wysiwyg.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ const Wysiwyg = Widget.extend({
205205
},
206206
filterMutationRecords: (records) => {
207207
return records.filter((record) => {
208-
return !(record.target.classList && record.target.classList.contains('o_header_standard'));
208+
return !(
209+
(record.target.classList && record.target.classList.contains('o_header_standard')) ||
210+
(record.type === 'attributes' && record.attributeName === 'data-last-history-steps')
211+
);
209212
});
210213
},
211214
preHistoryUndo: () => {

0 commit comments

Comments
 (0)