mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_widget_numeric_step: Remove focus to avoid annoying flickering effect
The focus introduced on the 16.0 migration is causing a flickering effect that is a bit annoying and does not make complete sense, because if you click more than once the cursor is positioned at the end of the text, which makes it difficult to edit the input. The counterpart of these changes is that to edit the input using the keyboard we will have to click on the field. Although this is how the module has been operating since its inception.
This commit is contained in:
@@ -7,7 +7,7 @@ Web Widget Numeric Step
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:aa00ea1d2e4245170c8f2a6e774bffe29af982ceddd43292a7871cf6f194fc25
|
||||
!! source digest: sha256:1062d0c26bb10198c524113d70fa069c5928514e9569f607316544fee88bb6d9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Project-Id-Version: Odoo Server 17.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:aa00ea1d2e4245170c8f2a6e774bffe29af982ceddd43292a7871cf6f194fc25
|
||||
!! source digest: sha256:1062d0c26bb10198c524113d70fa069c5928514e9569f607316544fee88bb6d9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_widget_numeric_step"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_numeric_step"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This widget changes input number field and make it easier to increment
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import {hasTouch} from "@web/core/browser/feature_detection";
|
||||
import {_lt} from "@web/core/l10n/translation";
|
||||
import {registry} from "@web/core/registry";
|
||||
import {FloatField} from "@web/views/fields/float/float_field";
|
||||
@@ -11,10 +10,6 @@ export class NumericStep extends FloatField {
|
||||
super.setup();
|
||||
}
|
||||
_onStepClick(ev) {
|
||||
const $el = $(ev.target).parent().parent().find("input");
|
||||
if (!hasTouch()) {
|
||||
$el.focus();
|
||||
}
|
||||
const mode = $(ev.target).data("mode");
|
||||
this._doStep(mode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user