Merge PR #3033 into 16.0

Signed-off-by yajo
This commit is contained in:
OCA-git-bot
2024-12-30 07:55:34 +00:00

View File

@@ -22,10 +22,19 @@ export class NumericStep extends FloatField {
}
_onWheel(ev) {
ev.preventDefault();
if (ev.deltaY > 0) {
this._doStep("minus");
} else {
this._doStep("plus");
if (!this._lastWheelTime) {
this._lastWheelTime = 0;
}
const now = Date.now();
const throttleLimit = 100;
if (now - this._lastWheelTime >= throttleLimit) {
this._lastWheelTime = now;
if (ev.deltaY > 0) {
this._doStep("minus");
} else {
this._doStep("plus");
}
}
}
updateField(val) {