Pressing shift+enter in quoted text isn't undoable

Here’s a block of quoted text for your convenience if you want to repro by editing this post:

Lorem ipsum dolor sit amet, PRESS SHIFT ENTER HERE consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

1 Like

We have no custom undo behavior coded, each browser does something slightly different here, but the consensus was that custom undo caused way more support and confusion than the way it is now

For context:

https://meta.discourse.org/t/ctrl-z-undo-and-redo-will-ignore-pasting/4537

I actually think this SHIFT ENTER behavior is super odd and totally unneeded. I think the correct action here is to remove this crazy magic, I can not see any use for it.

2 Likes

I don’t get it. What’s actually happening? I’m not seeing any difference between regular and +

Try pressing Enter after “HERE” is my quoted block. The line will simply be broken.

If you press Shift+Enter, each of the subsequent lines will be prefixed with >.

2 Likes

Oh, I see. It only occurs in > lines…

And yes, this is a very weird feature. It’s almost reminiscent of email clients, where rebreaking quoted lines is a typical feature — but it doesn’t apply to Discourse at all.

Lorem ipsum dolor sit amet, PRESS SHIFT ENTER HERE
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.

:open_mouth: Wow, it’s a “reflow text” button.

That’s not useful at all.

Feel free to rip it out and send a PR

Yeah this should be ripped out.

Okay, ripped out :scissors:

https://github.com/discourse/discourse/pull/3330

4 Likes

That is a lot of code for such an edge case.