diff --git a/web_widget_numeric_step/README.rst b/web_widget_numeric_step/README.rst index 678408d38..48d96b47e 100644 --- a/web_widget_numeric_step/README.rst +++ b/web_widget_numeric_step/README.rst @@ -7,7 +7,7 @@ Web Widget Numeric Step !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:404b377c03eeead0eb7b1dd03b17ecff3a4b72aff56decfdccd33e5bbcf1b8b5 + !! source digest: sha256:cc3d79cf1592294e77da78edc530b91ddfc931abe8f31a361b65ae2f197537b5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/web_widget_numeric_step/__manifest__.py b/web_widget_numeric_step/__manifest__.py index ee3700455..0186c368d 100644 --- a/web_widget_numeric_step/__manifest__.py +++ b/web_widget_numeric_step/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Web Widget Numeric Step", "category": "web", - "version": "16.0.1.1.0", + "version": "16.0.1.1.1", "author": "GRAP, Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/web", diff --git a/web_widget_numeric_step/static/description/index.html b/web_widget_numeric_step/static/description/index.html index 6231cca13..58adcf326 100644 --- a/web_widget_numeric_step/static/description/index.html +++ b/web_widget_numeric_step/static/description/index.html @@ -366,7 +366,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:404b377c03eeead0eb7b1dd03b17ecff3a4b72aff56decfdccd33e5bbcf1b8b5 +!! source digest: sha256:cc3d79cf1592294e77da78edc530b91ddfc931abe8f31a361b65ae2f197537b5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
This widget changes input number field and make it easier to increment the number thanks to 2 buttons (+ and -). diff --git a/web_widget_numeric_step/static/src/numeric_step.esm.js b/web_widget_numeric_step/static/src/numeric_step.esm.js index 6defd19ec..1522132d2 100644 --- a/web_widget_numeric_step/static/src/numeric_step.esm.js +++ b/web_widget_numeric_step/static/src/numeric_step.esm.js @@ -4,6 +4,7 @@ import {registry} from "@web/core/registry"; import {standardFieldProps} from "@web/views/fields/standard_field_props"; import {_lt} from "@web/core/l10n/translation"; import {FloatField} from "@web/views/fields/float/float_field"; +import {hasTouch} from "@web/core/browser/feature_detection"; export class NumericStep extends FloatField { setup() { @@ -11,7 +12,9 @@ export class NumericStep extends FloatField { } _onStepClick(ev) { const $el = $(ev.target).parent().parent().find("input"); - $el.focus(); + if (!hasTouch()) { + $el.focus(); + } const mode = $(ev.target).data("mode"); this._doStep(mode); }