Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

T/ckeditor5/1555: Properly handle enter key on objects. #75

Merged
merged 3 commits into from
Feb 21, 2019

Conversation

jodator
Copy link
Contributor

@jodator jodator commented Feb 20, 2019

Suggested merge commit message (convention)

Fix: Editor crashes after enter key on an image that is inside a blockquote. Closes ckeditor/ckeditor5#1555.


Additional information

  • This PR handles properly (as described in comment before if) enter key on object elements. The previous fix introduced problem with objects inside elements that were not described as limit in schema (<blockquote> is nether block nor limit nor anything else). The comment wasn't inline with the code as code checked is the element is not an limit rather then if it is a block (a block can be an object thus a limit).
  • The better would be just to ignore inline elements in that handler as they should be treated as text - so the inline object should be removed by that handler.
  • Also I found the superfluous check for delete key check in detecting direction of an arrow in arrow keys handler code which was removed.

@jodator
Copy link
Contributor Author

jodator commented Feb 20, 2019

@Mgsy could you briefly check that? I think that every case (including shift+enter) is handled - in root or inside a table cell also. This touched the inline-widgets also.

Copy link
Member

@Mgsy Mgsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@oskarwrobel oskarwrobel merged commit 8a8842b into master Feb 21, 2019
@oskarwrobel oskarwrobel deleted the t/ckeditor5/1555 branch February 21, 2019 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor crashes after inserting a new line after an image in a blockquote
3 participants