From 70c8c1e07c02c8386d1521b5697d8d8f32a5d47e Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Fri, 5 Sep 2025 23:04:12 -0300 Subject: [PATCH] fix(ui): unable to CTRL + A amount fields --- app/apps/common/widgets/decimal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/apps/common/widgets/decimal.py b/app/apps/common/widgets/decimal.py index 1edfd97..a421715 100644 --- a/app/apps/common/widgets/decimal.py +++ b/app/apps/common/widgets/decimal.py @@ -36,7 +36,7 @@ class ArbitraryDecimalDisplayNumberInput(forms.TextInput): { "x-data": "", "x-mask:dynamic": f"$money($input, '{get_format('DECIMAL_SEPARATOR')}', '{get_format('THOUSAND_SEPARATOR')}', '30')", - "x-on:keyup": "$el.dispatchEvent(new Event('input'))", + "x-on:keyup": "if (!['Control', 'Shift', 'Alt', 'Meta'].includes($event.key) && !(($event.ctrlKey || $event.metaKey) && $event.key.toLowerCase() === 'a')) $el.dispatchEvent(new Event('input'))", } )