Recover deleted editor text for New Topic?

(Christoph) #1

I don’t have much hope, but: is there a way to recover previously saved copies of the text in the (mobile) editor? Or is only the respective latest version saved?

I’m referring to the situation where the user starts composing a new topic but accidentally deletes the text (select all -> type any character) before pressing “create topic”.

(Sam Saffron) #2

Yeah we don’t store history on drafts, so this is going to be lost, sadly.

(Jeff Atwood) #3

Hmm, should we be overwriting a giant draft with… blank? That seems wrong to me.

(Sam Saffron) #4

Maybe, but there is a slippery slope, highlight all text hit “a”.

I guess we can amend it so we only save drafts if longer than N chars.

(Jeff Atwood) #5

Yeah certainly if the draft is less than our post char length minimum, why would we save that?? I think this is a no-brainer change, low risk, should go in 1.9.

(Sam Saffron) #6

Seems to already work this way from what I can tell, try it yourself…

(Jeff Atwood) #7

Hmm so we only “save” a blank 0-char draft? That’s f-ed up.

(Sam Saffron) #8

No … I mean I can see nothing to implement here, there appears to be no 0 length draft…


  1. Type stuff into composer
  2. Wait till draft saves
  3. Delete everything …
  4. Wait …
  5. Wait …
  6. No draft saved
  7. Reload
  8. Text is back

(Jeff Atwood) #9

What is your repro here @tophee because we aren’t able to repro this.

(Sam Saffron) #10

Ahh… we are protected on “posts” but not on “topic”

Cause it counts the title as well …

(Jeff Atwood) #11

I’ve edited the title to un-break this topic…

(Sam Saffron) #12

If we change it to “never save drafts” if “title” is filled but body is below threshold, people will complain that they lose “category and title” selections in drafts.

Someone is going to have to lose out here if we want to mandate that body must be longer than N to save a draft.

(Christoph) #13

Perhaps body can be prioritized on mobile, as there is no Ctrl+Z on mobile?

When exactly would we lose title and category? Only upon page reload?

(Jeff Atwood) #14

Yeah we can defer on this for now, it’s too complicated, and specific to new topic, so a narrow use case.

As long as we are covered in the typical case, topic reply, it’s fine for now.

(Sam Saffron) #15

It is a lot of work to delete all the text in the TEXTAREA in a new topic on mobile. Tons of work.

(Christoph) #16

Why? What’s so laborious about select-all and press a random key?

So does that mean that a workaround/safety net when composing a new topic is to not start with the title? In other words, leaving the title empty will prevent saving an empty body?

(Sam Saffron) #17

“long press” -> find “select all” -> click it -> “hit backspace” … that seems like lots of work to me, not something you do “by mistake”

It’s nothing like instinctively hitting ctrl-a, space

(Jeff Atwood) #18

Possibly why don’t you test it and get back to us? That’d be helpful.