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

Pressing Shift+Enter in Safari should fire soft enter event #13797

Merged
merged 2 commits into from
Apr 3, 2023
Merged

Conversation

niegowski
Copy link
Contributor

Suggested merge commit message (convention)

Fix (enter): Pressing Shift+Enter in Safari should insert <br> instead of splitting block. Closes #13321.


Additional information

@arkflpc arkflpc self-requested a review March 31, 2023 06:38
packages/ckeditor5-enter/tests/enterobserver.js Outdated Show resolved Hide resolved
packages/ckeditor5-enter/src/enterobserver.ts Show resolved Hide resolved
@@ -84,6 +86,32 @@ describe( 'EnterObserver', () => {
sinon.assert.notCalled( enterSpy );
} );

// See https://github.com/ckeditor/ckeditor5/issues/13321.
it( 'should handle the insertParagraph input type and fire the soft enter event if shift key is pressed in Safari', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd also test the following scenario:

  1. A user presses shift.
  2. A user releases shift.
  3. A user presses enter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test.

@niegowski niegowski requested a review from arkflpc March 31, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shift enter not inserting <br>'s in Safari
2 participants