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

Double enter should break out captions and lists (and similar) and onto a newline #579

Closed
jasmussen opened this issue May 1, 2017 · 8 comments
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

jasmussen commented May 1, 2017

From Ella:

break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

This should apply captions and list blocks, and probably other similar ones.

@jasmussen jasmussen added Design [Type] Enhancement A suggestion for improvement. labels May 1, 2017
@ellatrix
Copy link
Member

ellatrix commented May 1, 2017

I think number one seems expected.

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

Option 2 question: what happens if you're not at the end?

@jasmussen
Copy link
Contributor Author

jasmussen commented May 1, 2017

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

I like that. Also handily provides an answer to your solid followup option 2 question.

That being said, if we did go with option 2, pressing enter mid-sentence would, I suppose, split the stuff after the caret into a new paragraph.

Which leads to option 4: don't do anything when you press enter. No new lines, no nothing. You'd have to use the arrow keys to exit the paragraph.

@melchoyce
Copy link
Contributor

  1. You make a linebreak inside the caption (or paragraph break or whatever)

+1 — this is how I'd expect it to work.

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

+1 to this as well :)

@jasmussen jasmussen changed the title Decide what happens when you press Enter in captions Double enter in captions should break out of the caption and onto a newline May 10, 2017
@jasmussen jasmussen added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label May 10, 2017
@jasmussen jasmussen added this to the Alpha milestone May 10, 2017
@jasmussen jasmussen changed the title Double enter in captions should break out of the caption and onto a newline Double enter should break out captions and lists (and similar) and onto a newline May 11, 2017
@mtias
Copy link
Member

mtias commented May 16, 2017

I am not sure about breaking out of the caption with enter.

@jasmussen
Copy link
Contributor Author

I am not sure about breaking out of the caption with enter.

Just to be clear, it's enter enter — that is, enter on an empty line. Would you prefer the way to break out of a caption would be tab or arrow keys?

@ellatrix
Copy link
Member

See also #374

@mtias
Copy link
Member

mtias commented May 16, 2017

The case where you start breaking within the middle of a caption complicates it. Also as we consider all the new blocks being created, "breaking" the content of a block field by hitting enter is going to be fragile and convoluted. I think in most cases we should just remain within the editable field you are in.

@jasmussen jasmussen modified the milestones: May Week 3 (Alpha), Beta May 22, 2017
@jasmussen
Copy link
Contributor Author

Per this discussion, let's embrace the block, and close this for now. Tab will escape you. And if that isn't enough, we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants