From 2ae7c4e5807b3ed9984bd403248381efdfbc5f68 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 9 Jun 2026 13:55:23 +0200 Subject: [PATCH] =?UTF-8?q?fix(amount)=20:=20borne=20le=20curseur=20restau?= =?UTF-8?q?r=C3=A9=20lors=20d'un=20rejet=20maxLength?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/malio/input/InputAmount.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/malio/input/InputAmount.vue b/app/components/malio/input/InputAmount.vue index d8806ae..fd9bf9d 100644 --- a/app/components/malio/input/InputAmount.vue +++ b/app/components/malio/input/InputAmount.vue @@ -201,7 +201,7 @@ const onInput = (event: Event) => { // maxLength borne la longueur du MODÈLE (pas l'affichage) : on ignore le keystroke en dépassement. if (props.maxLength != null && model.length > Number(props.maxLength)) { target.value = formattedValue.value - const restored = Math.max(0, caret - 1) + const restored = Math.min(Math.max(0, caret - 1), formattedValue.value.length) target.setSelectionRange(restored, restored) return }