From 8197d55ed13991d32a33236f7cb9b01acce4da53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 12 Dec 2023 11:47:07 +0100 Subject: [PATCH] Set the same width to input and its group Such that the suffix are next to the input. Closes #12821 --- sao/src/view/form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sao/src/view/form.js b/sao/src/view/form.js index 4eb242b552..8c05130080 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -1635,7 +1635,7 @@ function eval_pyson(value){ if (record) { length = record.expr_eval(this.attributes.size); if (length > 0) { - width = null; + width = (length + 5) + 'ch'; } } this.input.val(this.get_client_value()); @@ -2053,6 +2053,7 @@ function eval_pyson(value){ if (this.width !== null){ this.input_text.css('width', this.width + 'ch'); this.input.css('width', (this.width + 5) + 'ch'); + this.group.css('width', (this.width + 5) + 'ch'); } if (field) { value = field.get_client(record, this.factor, this.grouping);