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

Error thrown while using widget type around from a nested widget #14714

Closed
oleq opened this issue Aug 2, 2023 · 3 comments · Fixed by #14722
Closed

Error thrown while using widget type around from a nested widget #14714

oleq opened this issue Aug 2, 2023 · 3 comments · Fixed by #14722
Assignees
Labels
package:engine squad:core Issue to be handled by the Core 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

@oleq
Copy link
Member

oleq commented Aug 2, 2023

📝 Provide detailed reproduction steps (if any)

  1. Go to http://fake.ckeditor.com:8125/ckeditor5/tests/manual/article.html.
  2. Create a table
  3. Create a nested one (or add an image, any widget will do)
  4. Click a widget type around button

✔️ Expected result

A paragraph is added.

❌ Actual result

An error is thrown.

2023-08-02 11 07 04

📃 Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …

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

@oleq oleq added type:bug This issue reports a buggy (incorrect) behavior. package:engine type:regression This issue reports a bug that was not present in the previous releases. labels Aug 2, 2023
@Witoso Witoso added the squad:core Issue to be handled by the Core team. label Aug 2, 2023
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Aug 2, 2023
@niegowski
Copy link
Contributor

This is caused by trying to set selection into the not attached element:

writer.setSelection( paragraph, 'in' );

@niegowski
Copy link
Contributor

This code:

if ( isInEmptyBlock || isAtEndOfTextBlock ) {
position = writer.createPositionAfter( positionParent );
} else if ( isAtStartOfTextBlock ) {
position = writer.createPositionBefore( positionParent );

Is trying to insert paragraph after the table cell (not the table itself).

@oleq
Copy link
Member Author

oleq commented Aug 2, 2023

Most likely a regression after #14510.

@niegowski niegowski self-assigned this Aug 2, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Aug 2, 2023
@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Aug 2, 2023
arkflpc added a commit that referenced this issue Aug 3, 2023
Fix (paragraph): Fixed inserting paragraph after/before a widget inside a table cell. Closes #14714.
@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 3, 2023
@CKEditorBot CKEditorBot added this to the iteration 66 milestone Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine squad:core Issue to be handled by the Core 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

Successfully merging a pull request may close this issue.

5 participants