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

Editor crashes when the last row is removed #6370

Closed
mlewand opened this issue Mar 3, 2020 · 0 comments · Fixed by ckeditor/ckeditor5-table#273
Closed

Editor crashes when the last row is removed #6370

mlewand opened this issue Mar 3, 2020 · 0 comments · Fixed by ckeditor/ckeditor5-table#273
Assignees
Labels
package:table 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

@mlewand
Copy link
Contributor

mlewand commented Mar 3, 2020

📝 Provide detailed reproduction steps (if any)

  1. Open the table manual test.
  2. Put a (collapsed) selection in the last row of the first table, e.g. Pl^uto
  3. Use remove last row option.

✔️ Expected result

Last row is being removed, the selection goes to the last cell of the table after removal (Neptune last cell in the row).

❌ Actual result

Editor crashes with:

Uncaught TypeError: Cannot read property 'getChild' of null
    at getCellToFocus (removerowcommand.js:113)
    at Object.callback (removerowcommand.js:102)
    at Model._runPendingChanges (model.js:797)
    at Model.change (model.js:170)
    at RemoveRowCommand.execute (removerowcommand.js:61)
    at RemoveRowCommand.<anonymous> (observablemixin.js:255)
    at RemoveRowCommand.fire (emittermixin.js:209)
    at RemoveRowCommand.<computed> [as execute] (observablemixin.js:259)
    at CommandCollection.execute (commandcollection.js:68)
    at ClassicEditor.execute (editor.js:285)

📃 Other details

  • Browser: Any
  • OS: Win10 (any I guess)
  • CKEditor version: Latest master it's not reproducible on v17.0.0.

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

@mlewand mlewand 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. labels Mar 3, 2020
@mlewand mlewand added this to the iteration 30 milestone Mar 3, 2020
oleq added a commit to ckeditor/ckeditor5-table that referenced this issue Mar 11, 2020
Fix: Removing the last table row should not crash the editor. Closes ckeditor/ckeditor5#6370.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table 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

Successfully merging a pull request may close this issue.

1 participant