[FIX] web_editor: prevent powerbox step from staying in history

Before this commit
Calling a command of the powerbox created a step that delete the input
content of the powerbox. That input content came back upon undo.

After this commit
The input content that select a command from the powerbox should
never come back upon undo.

task-2806849

closes odoo/odoo#87994

X-original-commit: 2da3d928ad4c7e7c285b753fb1241326089d45e7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Nicolas Bayet
2022-04-05 16:15:17 +02:00
parent a0e94aa078
commit 0f37addf61
@@ -1845,6 +1845,7 @@ export class OdooEditor extends EventTarget {
preValidate: () => {
this._historyRevertUntil(this._beforeCommandbarStepIndex);
this.historyStep(true);
this._historyStepsStates.set(peek(this._historySteps).id, 'consumed');
setTimeout(() => {
this.editable.focus();
getDeepRange(this.editable, { select: true });