From 0263ec8cc863c669656dfb41df9ece8a710a676d Mon Sep 17 00:00:00 2001 From: "Guillaume (gdi)" Date: Thu, 20 Jan 2022 09:17:01 +0000 Subject: [PATCH] [IMP] website, website_sale, web_editor: set step on numeric inputs Changing numeric values using the keyboard arrows did not work on some fields. This commit solves this problem by adding the necessary attributes to the numeric (we-)inputs. task-2601533 Part-of: odoo/odoo#81241 --- addons/web_editor/static/src/xml/wysiwyg.xml | 2 +- addons/website/static/src/snippets/s_chart/options.js | 3 +++ addons/website/views/snippets/s_chart.xml | 4 ++-- addons/website_sale/views/snippets/snippets.xml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/web_editor/static/src/xml/wysiwyg.xml b/addons/web_editor/static/src/xml/wysiwyg.xml index c64ad37a4e1..25ee17cb114 100644 --- a/addons/web_editor/static/src/xml/wysiwyg.xml +++ b/addons/web_editor/static/src/xml/wysiwyg.xml @@ -249,7 +249,7 @@
- + px
diff --git a/addons/website/static/src/snippets/s_chart/options.js b/addons/website/static/src/snippets/s_chart/options.js index 5c9ca2b14f1..33cf1c95192 100644 --- a/addons/website/static/src/snippets/s_chart/options.js +++ b/addons/website/static/src/snippets/s_chart/options.js @@ -305,6 +305,9 @@ options.registry.InnerChart = options.Class.extend({ const newEl = document.createElement(tag); const contentEl = document.createElement('input'); contentEl.type = 'text'; + if (tag === 'td') { + contentEl.type = 'number'; + } contentEl.value = value || ''; if (backgroundColor) { contentEl.dataset.backgroundColor = backgroundColor; diff --git a/addons/website/views/snippets/s_chart.xml b/addons/website/views/snippets/s_chart.xml index 379d8552587..80c0783cb03 100644 --- a/addons/website/views/snippets/s_chart.xml +++ b/addons/website/views/snippets/s_chart.xml @@ -53,8 +53,8 @@ - - + + List - + by 2