Pressing shift+enter in quoted text isn't undoable


(Dan Dascalescu) #1

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.


Undo (Ctrl/Cmd+Z) doesn't work for Markdown
(Sam Saffron) #2

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:

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.


(Jens Maier) #3

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


(Dan Dascalescu) #4

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 >.


(Jens Maier) #5

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.


(Kane York) #6

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.


(Sam Saffron) #7

Feel free to rip it out and send a PR


(Jeff Atwood) #8

Yeah this should be ripped out.


(Arpit Jalan) #9

Okay, ripped out :scissors:

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


(Jeff Atwood) #10

(Sam Saffron) #11

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