Shift-enter at the end of a pre-formatted text block should act like shift-enter anywhere else in the block
Open, NormalPublic

Description

When editing preformatted text, hitting Enter ends the preformatted block. Shift-Enter splits the block, unless the cursor is at the end, when it doesn't, for no solid reason.

despens created this task.Dec 17 2014, 9:16 PM
despens updated the task description. (Show Details)
despens raised the priority of this task from to Needs Triage.
despens added a project: VisualEditor.
despens changed Security from none to None.
despens added a subscriber: despens.

Shift+Enter in a pre-formatted block already does insert a line break for me. Does it not for you?

despens added a comment.EditedDec 17 2014, 9:37 PM

Oh! I figured the design issue is more complicated:

Currently there are two cases:

1.1 Put the cursor (caret) into already existing, multi-line pre-formatted block.
1.2 Shift+Enter creates line break when cursor is above last line of the preformatted block.
1.3 Shift+Enter makes cursor leave preformatted block when cursor is on the last line of the preformatted block.

2.1 Put cursor in empty space
2.2 Select 'Preformatted' from format dropdown
2.3 Start typing, then press Shift+Enter
2.4 Cursor leaves preformatted block!

So it is impossible to create preformatted blocks from scratch :)

Shift+Enter should just always create a line break.

Oh, hmm, this is a bug.

Jdforrester-WMF renamed this task from Improve editing preformatted text to Shift-enter at the end of a pre-formatted text block should act like shift-enter anywhere else in the block.Dec 17 2014, 9:40 PM
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF triaged this task as Normal priority.