From 19eb708c7850a124eb2c548ba680304a1fd17277 Mon Sep 17 00:00:00 2001 From: "Guillaume (gdi)" Date: Thu, 20 Jan 2022 09:15:37 +0000 Subject: [PATCH] [IMP] website: improve events on we-matrix This commit improves the handling of events on the editor's we-matrix. The fields that make up the list trigger a preview at each input and the user can navigate through the matrix with the keyboard. task-2601533 Part-of: odoo/odoo#81241 --- addons/website/static/src/snippets/s_chart/options.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/website/static/src/snippets/s_chart/options.js b/addons/website/static/src/snippets/s_chart/options.js index 711b94ad1f7..5c9ca2b14f1 100644 --- a/addons/website/static/src/snippets/s_chart/options.js +++ b/addons/website/static/src/snippets/s_chart/options.js @@ -17,7 +17,7 @@ options.registry.InnerChart = options.Class.extend({ 'click we-button.add_row': '_onAddRowClick', 'click we-button.o_we_matrix_remove_col': '_onRemoveColumnClick', 'click we-button.o_we_matrix_remove_row': '_onRemoveRowClick', - 'blur we-matrix input': '_onMatrixInputFocusOut', + 'input we-matrix input': '_onMatrixInputInput', 'focus we-matrix input': '_onMatrixInputFocus', }), @@ -476,9 +476,8 @@ options.registry.InnerChart = options.Class.extend({ }, /** * @private - * @param {Event} ev */ - _onMatrixInputFocusOut: function (ev) { + _onMatrixInputInput() { this._reloadGraph(); }, /**