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

Enter will not break the quote if Shift is pressed #23

Closed
wants to merge 3 commits into from
Closed

Enter will not break the quote if Shift is pressed #23

wants to merge 3 commits into from

Conversation

ocavue
Copy link

@ocavue ocavue commented Apr 30, 2018

Suggested merge commit message (convention)

Feature: Enter with Shift will not break the quote. Closes #23 .


Reason

Quote with empty lines is allowed by default:

01

But I can't input an empty line in the quote directly because of that Enter key will break quote. So I add this future.

Additional information

DomEventData.domEvent is an undocumented attribute, which may cause some problem in future.

@ocavue ocavue changed the title Enter will not break the quota if Shift is pressed Enter will not break the quote if Shift is pressed Apr 30, 2018
@coveralls
Copy link

coveralls commented Apr 30, 2018

Coverage Status

Coverage decreased (-2.2%) to 97.826% when pulling efe6f6e on ocavue:dev_shift_quota into c7b6479 on ckeditor:master.

@ocavue
Copy link
Author

ocavue commented May 3, 2018

I pushed a commit 3a74581, and Travis-ci raised an error because of "Cannot load browser BrowserStack_Edge". Then I reverted it (84096ad) but Travis-ci still refused it for the same reason. I am extremely confused because 84096ad and c7b6479, who is the last commit on master and has been passed by Travis-ci, have the same code.

@Reinmar Could you do me a favor and look into this issue?

@Reinmar
Copy link
Member

Reinmar commented May 4, 2018

That's because of https://github.com/ckeditor/ckeditor5-dev/issues/402. You can ignore this error for now.

@Reinmar
Copy link
Member

Reinmar commented May 4, 2018

OK, all green after we fixed https://github.com/ckeditor/ckeditor5-dev/issues/402.

@Reinmar
Copy link
Member

Reinmar commented May 4, 2018

Let's focus on the PR now.

  • The first thing that I miss is a ticket in which the issue would be described. It's a bit hard to understand it from the screencast.
  • There's no support for shift+enter yet, which means that the current behaviour can be a bit random. I'm not sure we should actually change anything before we'll have https://github.com/ckeditor/ckeditor5-enter/issues/2 resolved.

@Reinmar
Copy link
Member

Reinmar commented May 4, 2018

Anyway, let's better understand the problem first and see if:

  • it will still be a problem once soft break is implemented,
  • the behaviour without the soft break plugin loaded (which may still happen in the future) is reasonable; perhaps, it will turn out that if soft break is not loaded, the hard break plugin should handle enter and shift+enter in the same way.

@ocavue
Copy link
Author

ocavue commented May 5, 2018

OK, all green after we fixed ckeditor/ckeditor5-dev#402.

It works now. Thanks for your help.

The first thing that I miss is a ticket in which the issue would be described. It's a bit hard to understand it from the screencast.

OK. I will open an issue for this future.

@Reinmar
Copy link
Member

Reinmar commented Jun 18, 2018

The behaviour that you wanted to achieve:

If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote, unless the Shift key is pressed.

Is exactly how it works on master now. So I'm closing this PR. Thanks!

@Reinmar Reinmar closed this Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants