From bace374c3e97bb2846131635e596af2644d11227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 22 Oct 2023 17:22:29 +0200 Subject: [PATCH] Limit colspan to the number columns Since e5446fb8d4ce the colspan value is used the grid css rules so it must be limited to the number of columns. Closes #12655 --- sao/src/view/form.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sao/src/view/form.js b/sao/src/view/form.js index f2588db755..7fc2a67f95 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -560,9 +560,14 @@ function eval_pyson(value){ if (xexpand === undefined) xexpand = 1; // CSS grid elements are 1-indexed - if ((this.col > 0) && ((this._col + colspan) > (this.col + 1))) { - this._col = 1; - this._row += 1; + if (this.col > 0) { + if (colspan > this.col) { + colspan = this.col; + } + if ((this._col + colspan) > (this.col + 1)) { + this._col = 1; + this._row += 1; + } } var el;