From 3573fcf3f186ec6608b115db5abf98cb17d2e2fd Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Wed, 8 Feb 2023 14:22:29 +0000 Subject: [PATCH] [REM] web_editor: remove useless _shouldDelayBlur fix The fix that introduced `this._shouldDelayBlur = true` in `openMediaDialog` was wrong as it was fixing a symptom rather than the source of the problem. Later fix probably fixed the source of the problem as the problem is not reproducible at the time of this commit. If the symptom comes back, it ought to be fixed at it's source. closes odoo/odoo#112245 X-original-commit: 0dd9da029d58652123ea71085dbb3a1a1e93e77d Signed-off-by: David Monjoie (dmo) --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index a7bf2883759..9172ab28753 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -1359,11 +1359,6 @@ const Wysiwyg = Widget.extend({ const field = $editable.data('oe-field'); const type = $editable.data('oe-type'); - // The html_field value should not be updated while the mediaDialog is - // in use because if its value change, restoreSelection may fail since - // it has a reference to HTMLElements which are not in the DOM anymore. - this._shouldDelayBlur = true; - this.mediaDialogWrapper = new ComponentWrapper(this, MediaDialogWrapper, { resModel: model, resId: $editable.data('oe-id'),