Gutenberg-mobile: Add ability to add single new-line when typing Shift + Enter

Created on 7 Feb 2019  Â·  14Comments  Â·  Source: wordpress-mobile/gutenberg-mobile

Current Behavior

Currently when I'm focused on a text block (paragraph, heading) and type Shift + Enter, a new block is created – which is the same behavior as typing Enter.

Expected Behavior

I expect that if I type Shift + Enter in a block, it should simply add a single new-line instead of creating a new block.

Implementation coverage

  • [ ] Android
  • [ ] iOS
[Pri] Low [Type] Enhancement

Most helpful comment

Let's find a workaround to enable users to input line breaks without paragraph split. It's really frustrating to do it when one really wants it, to nicely format small paragraphs like the following (think: a small poem. h/t @madeincosmos):

Soft line breaks
Within a
Single block

Followed by
Another
Block underneath

All 14 comments

@iamthomasbishop I tested this on iOS and it works if you apply Shift+Enter in the middle of the paragraph/block.

That said I did found a bug when you try to do this and the end of the paragraph that makes the system crash.

Hmm, that's not what I'm seeing – maybe this was fixed in a more recent build than the beta I'm testing on (HockeyApp). Here's what I'm seeing, for reference:

shift_enter_bugs

@iamthomasbishop you are right the Shift+Enter it's only working when using a my laptop keyboard to do it, if I use the device touch keyboard I get the block split.

@diegoreymendez may confirm but IIRC we tried something similar on aztec and this was impossible to detect on iOS on the screen keyboard

This isn't supported in iOS. It's only possible through a hardware keyboard.

Sorry, I closed this by mistake and reopened it.

This isn't supported in iOS. It's only possible through a hardware keyboard.

@diegoreymendez Fair enough. Just tested on Google Docs and Dropbox Paper and it's the same thing. So we can ax this issue for now if we need to.

Shift-Enter with external keyboards would still be useful and perhaps even more when on tablets so, I'd leave this ticket open.

@iamthomasbishop Is it OK with you to just rename it to "... on external keyboards"?

FYI: Shift+Enter using external keyboards works correctly in iOS.

On Thu, 14 Mar 2019 at 15:30, Stefanos Togoulidis notifications@github.com
wrote:

Shift-Enter with external keyboards would still be useful and perhaps even
more when on tablets so, I'd leave this ticket open.

@iamthomasbishop https://github.com/iamthomasbishop Is it OK with you
to just rename it to "... on external keyboards"?

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/wordpress-mobile/gutenberg-mobile/issues/559#issuecomment-472919712,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnxUVKVPfOM_KiSipHVDuSXVDhbX0Npks5vWmr9gaJpZM4anaTJ
.

Let's find a workaround to enable users to input line breaks without paragraph split. It's really frustrating to do it when one really wants it, to nicely format small paragraphs like the following (think: a small poem. h/t @madeincosmos):

Soft line breaks
Within a
Single block

Followed by
Another
Block underneath

I noticed something that probably isn't directly helpful but _might_ point the way for some possible solutions...

On both Android and iOS it seems we can get soft-enter-like behavior _sometimes_ if you type very quickly (not swipe) and then hit enter. The video below is from an Android release build not connected to the bundler (so I don't think it was just the result of a bundler delay, although I suspect it may still be related to the asynchronous communication across the bridge). I wasn't able to tell why it would sometimes give me a soft enter and sometimes not.

soft-new-line mp4

Currently, pressing enter on image captions does create a new line instead of adding a new empty paragraph block. When addressing this, it would be good to give consistent behavior to the image caption as well.

Noting that this came up in Slack and that Eli suggested possibly adding a button to the toolbar as a potential solution.

(internal reference: p1602473723029700-slack-cellular-happiness)

From an app review on Google Play

Block Editor: Would be great if there was a way to break a line ( ) Because with an Enter on the smartphone keyboard there is always a new block and "Shift + Enter" none of my keyboards know (3 different installed)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

designsimply picture designsimply  Â·  4Comments

Tug picture Tug  Â·  3Comments

iamthomasbishop picture iamthomasbishop  Â·  3Comments

mkevins picture mkevins  Â·  3Comments

etoledom picture etoledom  Â·  4Comments