Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table resize after column insert undo crashes the editor #12266

Closed
Acrophost opened this issue Aug 12, 2022 · 1 comment
Closed

Table resize after column insert undo crashes the editor #12266

Acrophost opened this issue Aug 12, 2022 · 1 comment
Assignees
Labels
package:table squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.

Comments

@Acrophost
Copy link

Acrophost commented Aug 12, 2022

📝 Provide detailed reproduction steps (if any)

  1. Insert a table
  2. Insert a new column somewhere in the middle of created table
  3. Change the width of new column with column resize
  4. Undo to the point before adding new column
  5. Attempt to resize the table with rightmost column resize

✔️ Expected result

Table will properly resize without any jumps.

❌ Actual result

Column resize doesn't budge no matter how much force is used on it.
Console throws a wall of errors.
The editor is now working in an extremely bugged way.

insert.column.editor.crash.2022-08-12.at.11.35.57.mov

📃 Other details

Console error:

Uncaught TypeError: Cannot read properties of undefined (reading '\_setStyle')  
at DowncastWriter.setStyle (downcastwriter.ts:378:1)  
at tablecolumnresizeediting.js:534:1  
at View.change (view.ts:427:1)  
at TableColumnResizeEditing.\_onMouseMoveHandler (tablecolumnresizeediting.js:531:1)  
at invokeFunc (debounce.js:95:1)  
at trailingEdge (debounce.js:144:1)  
at timerExpired (debounce.js:132:1)  

If in step 5 a different resize is used, the columns jump a bit and table resizes in a bugged way.
After that everything works as expected.

insert.table.resize.jump.2022-08-12.at.11.48.28.mov

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@Acrophost Acrophost added type:bug This issue reports a buggy (incorrect) behavior. package:table type:regression This issue reports a bug that was not present in the previous releases. squad:features Issue to be handled by the Features team. labels Aug 12, 2022
@Dumluregn Dumluregn self-assigned this Aug 12, 2022
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Aug 12, 2022
mlewand added a commit that referenced this issue Aug 22, 2022
Internal (table): Calculate the modified cells positions dynamically instead of keeping the static map in the plugin. Closes #12266.
@mlewand
Copy link
Contributor

mlewand commented Aug 22, 2022

Fixed with #12288

@mlewand mlewand closed this as completed Aug 22, 2022
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Aug 22, 2022
@Reinmar Reinmar added this to the iteration 56 milestone Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.
Projects
None yet
Development

No branches or pull requests

5 participants