From ca3e978c55c1f1f4260b2177a7189d5a06701cdc Mon Sep 17 00:00:00 2001 From: Mateusz Baginski Date: Mon, 15 Apr 2024 08:25:24 +0200 Subject: [PATCH] Fix outdated value in column resize custom input --- .../src/tablecolumnresize/tablecolumnresizeui.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeui.ts b/packages/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeui.ts index 835a92549c3b..521038f47030 100644 --- a/packages/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeui.ts +++ b/packages/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeui.ts @@ -178,6 +178,10 @@ export default class TableColumnResizeUI extends Plugin { } ); } + // Ensure that command value is always up to date. Column resizing does not trigger command refresh all of the time. + // In some scenarios like resizing column and then undoing this the plugins are not refreshed and value is outdated. + command.refresh(); + // Make sure that each time the panel shows up, the field remains in sync with the value of // the command. If the user typed in the input, then canceled the balloon (`labeledInput#value` // stays unaltered) and re-opened it without changing the value of the command, they would see the