mirror of https://github.com/OCA/web.git
commit
0e2ba28ff5
|
@ -4,6 +4,7 @@ import {registry} from "@web/core/registry";
|
||||||
import {standardFieldProps} from "@web/views/fields/standard_field_props";
|
import {standardFieldProps} from "@web/views/fields/standard_field_props";
|
||||||
import {_lt} from "@web/core/l10n/translation";
|
import {_lt} from "@web/core/l10n/translation";
|
||||||
import {FloatField} from "@web/views/fields/float/float_field";
|
import {FloatField} from "@web/views/fields/float/float_field";
|
||||||
|
import {hasTouch} from "@web/core/browser/feature_detection";
|
||||||
|
|
||||||
export class NumericStep extends FloatField {
|
export class NumericStep extends FloatField {
|
||||||
setup() {
|
setup() {
|
||||||
|
@ -11,7 +12,9 @@ export class NumericStep extends FloatField {
|
||||||
}
|
}
|
||||||
_onStepClick(ev) {
|
_onStepClick(ev) {
|
||||||
const $el = $(ev.target).parent().parent().find("input");
|
const $el = $(ev.target).parent().parent().find("input");
|
||||||
|
if (!hasTouch()) {
|
||||||
$el.focus();
|
$el.focus();
|
||||||
|
}
|
||||||
const mode = $(ev.target).data("mode");
|
const mode = $(ev.target).data("mode");
|
||||||
this._doStep(mode);
|
this._doStep(mode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue