Skip to content
New issue

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

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

Already on GitHub? # to your account

insertParagraph command creates additional empty paragraph when used at the end of block element #13866

Closed
FilipTokarski opened this issue Apr 12, 2023 · 0 comments · Fixed by #14510
Assignees
Labels
domain:dx This issue reports a developer experience problem or possible improvement. domain:framework-dx This issue reports a problem with the developer experience while working with the framework. domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. intro Good first ticket. squad:features Issue to be handled by the Features team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

📝 Provide detailed reproduction steps (if any)

  1. Open editor
  2. Put the caret at the end of a paragraph
  3. Use the following code to insert a new empty paragraph:
editor.execute( 'insertParagraph', {
  position: editor.model.document.selection.getLastPosition()
} );

✔️ Expected result

One empty paragraph is inserted.

❌ Actual result

There are two empty paragraphs inserted:

Screen.Recording.2023-04-12.at.11.29.04.mov

📃 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.

@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. support:2 An issue reported by a commercially licensed client. squad:core Issue to be handled by the Core team. labels Apr 12, 2023
@Reinmar Reinmar added domain:dx This issue reports a developer experience problem or possible improvement. domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. domain:framework-dx This issue reports a problem with the developer experience while working with the framework. labels Apr 12, 2023
@mlewand mlewand added squad:features Issue to be handled by the Features team. intro Good first ticket. and removed squad:core Issue to be handled by the Core team. labels Jun 30, 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 Jun 30, 2023
@illia-stv illia-stv self-assigned this Jun 30, 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 Jun 30, 2023
Dumluregn added a commit that referenced this issue Jul 10, 2023
…and-creates-additional-empty-paragraph-when-used-at-the-end-of-block-element

Fix (paragraph): The `insertParagraph` command won't insert two paragraphs when position is at the edge of the block. Closes #13866.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 10, 2023
@CKEditorBot CKEditorBot added this to the iteration 65 milestone Jul 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
domain:dx This issue reports a developer experience problem or possible improvement. domain:framework-dx This issue reports a problem with the developer experience while working with the framework. domain:integration-dx This issue reports a problem with the developer experience when integrating CKEditor into a system. intro Good first ticket. squad:features Issue to be handled by the Features team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
5 participants