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

Change suggestion containing a new table with header column and cell split is not applied correctly when using getDataWithAcceptedSuggestions() #17404

Closed
lkszzajac opened this issue Nov 6, 2024 · 3 comments
Assignees
Labels
package:table squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@lkszzajac
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Open an editor with Table, TrackChanges and TrackChangesData plugins (e.g. ckeditor5/external/ckeditor5-commercial/packages/ckeditor5-collaboration/tests/manual/all-features-rtc.html)
  2. Enable Track Changes and perform these actions:
    1. Add a 5x5 table.
    2. Add a header column
    3. Split one of the cells in the header column
  3. Extract data from the document using editor.plugins.get("TrackChangesData").getDataWithAcceptedSuggestions()

✔️ Expected result

  • extracted table markup has the same structure as in editor

❌ Actual result

  • extracted table includes 4 additional columns at the end
  • header row is applied

Image

📃 Other details

  • Browser: n/a
  • OS: n/a
  • First affected CKEditor version:
  • Installed CKEditor plugins:

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

@lkszzajac lkszzajac added package:table support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior. labels Nov 6, 2024
@mmotyczynska
Copy link
Contributor

The bug can be reproduced without using Track Changes.

  1. Open the documentation for tables: https://ckeditor.com/docs/ckeditor5/latest/features/tables/tables.html
  2. Insert a 5x5 table.
  3. Convert the first column to a header column.
  4. Horizontally split one of the cells in the header column.
  5. Set the current data using the Inspector or in the console: editor.setData( editor.getData() )

This results in the table expanding to an unintended size (9x6). Additionally, it then becomes impossible to undo any changes.
https://github.com/user-attachments/assets/4fab1855-5fbb-409f-8807-8cbacdc47cfb

@Greatowen42

This comment has been minimized.

Mati365 added a commit that referenced this issue Dec 16, 2024
…eading rows. (#17640)

Fix (table): Prevent table corruption when setting editor data with th cells following colspan rows. Closes #17556, #17404
@Mati365 Mati365 self-assigned this Dec 20, 2024
@Mati365
Copy link
Member

Mati365 commented Dec 20, 2024

I checked this, works fine after fix merged in #17640.

@Mati365 Mati365 closed this as completed Dec 20, 2024
@Witoso Witoso added this to the iteration 82 milestone Dec 20, 2024
@Witoso Witoso added the squad:core Issue to be handled by the Core team. label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

5 participants