From a93286dc2aa5dff845a893efac68dfda86f199c6 Mon Sep 17 00:00:00 2001 From: "Guillaume (gdi)" Date: Thu, 10 Feb 2022 13:11:19 +0000 Subject: [PATCH] [FIX] website: ensure order of we-matrix's events This commit ensures that changes are applied in the same order as the events are triggered on the we-matrix. This was not the case because of another bug we had to consider and which is not there anymore, this is why this fix is done in 15.0 and not before. This commit is the continuation of [1] which applied the same change for we-input. [1]: https://github.com/odoo/odoo/commit/db62a5fac123fc72e37e94709b1a0c80f32a8a29 task-2761187 closes odoo/odoo#84486 X-original-commit: 703e1ec69c2cbdbdbafeef9ac359db9f0f3b7021 Signed-off-by: Quentin Smetz (qsm) --- .../website/static/src/snippets/s_chart/options.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/addons/website/static/src/snippets/s_chart/options.js b/addons/website/static/src/snippets/s_chart/options.js index bcce637a661..527bc5f03f7 100644 --- a/addons/website/static/src/snippets/s_chart/options.js +++ b/addons/website/static/src/snippets/s_chart/options.js @@ -479,18 +479,7 @@ options.registry.InnerChart = options.Class.extend({ * @param {Event} ev */ _onMatrixInputFocusOut: function (ev) { - // Sometimes, an input is focusout for internal reason (like an undo - // recording) then focused again manually in the same JS stack - // execution. In that case, the blur should not trigger an option - // selection as the user did not leave the input. We thus defer the blur - // handling to then check that the target is indeed still blurred before - // executing the actual option selection. - setTimeout(() => { - if (ev.currentTarget === document.activeElement) { - return; - } - this._reloadGraph(); - }); + this._reloadGraph(); }, /** * Set the selected cell/header and display the related remove button