Page MenuHomePhabricator

VisualEditor: Adding newlines at start/end of preformatted text is broken
Closed, ResolvedPublic

Description

[14:38] <gwicke> in native CE shift-enter inserts a newline in a pre
[14:38] <gwicke> normal enter splits it
[14:40] <gwicke> woah: shift-enter actually works in VE as long as it is not on the last line of a pre
[14:41] <gwicke> it does not work when the cursor is on the first or last char in a pre
[14:41] <gwicke> before first char a paragraph is inserted before the pre
[14:41] <gwicke> after last char a paragraph is inserted after the pre and the cursor moves there


Version: unspecified
Severity: minor

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:41 AM
bzimport set Reference to bz58773.

I just ran into this bug while using VisualEditor and preformatted text. I consider this a severe issue in the preformatted editor, so I wonder if this could be raised and fixed.

I've also ran into this and was wondering what the status/plan for fixing or working around this bug is, thanks!

And ran into this again :( quite annoying for preformatted sections in VE, I need to switch back to source editing

The (ugly) workaround I'm using since years on this issue:

  • type an 'x' and the end
  • move the cursor left next to the 'x'
  • press shift-enter a couple of times to get the blank lines needed
  • edit those lines
  • finally remove the trailing 'x'

I would really like to see a more user-friendly fix on this.

Change 806917 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] Handle Shift+Enter at the start/end of pre nodes too

https://gerrit.wikimedia.org/r/806917

Change 806917 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Handle Shift+Enter at the start/end of pre nodes too

https://gerrit.wikimedia.org/r/806917

Change 809024 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (c5804af0a)

https://gerrit.wikimedia.org/r/809024

Change 809024 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (c5804af0a)

https://gerrit.wikimedia.org/r/809024