From 4a5da5de34f638cf505a3340d0d2e0b4d419ce1f Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 18 Jan 2024 16:36:23 +0800 Subject: [PATCH] fix out of bounds column widths --- Roo/htmleditor/BlockTd.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Roo/htmleditor/BlockTd.js b/Roo/htmleditor/BlockTd.js index 3f37011df2..6bda2c3429 100644 --- a/Roo/htmleditor/BlockTd.js +++ b/Roo/htmleditor/BlockTd.js @@ -684,7 +684,11 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { this.colWidths[i] = nw; return; } - this.colWidths[i] += otherAdd + if (typeof(this.colWidths[i]) == 'undefined') { + this.colWidths[i] = otherAdd; + } else { + this.colWidths[i] += otherAdd; + } }, this); this.updateWidths(table); @@ -704,7 +708,12 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { this.colWidths[i] = nw; return; } - this.colWidths[i] -= otherSub + if (typeof(this.colWidths[i]) == 'undefined') { + this.colWidths[i] = otherSub; + } else { + this.colWidths[i] -= otherSub; + } + }, this); this.updateWidths(table); -- 2.39.2