Suggestion - save to clipboard when posting?

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
philiplu
Posts: 27
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Suggestion - save to clipboard when posting?

Post by philiplu »

When posting a message to a problem thread, or when doing "Preview Message", I'll infrequently hit an error that causes the entire post to be lost. Might have something to do with a timeout, though I've sometimes seen it when it hasn't been too long since the last preview check. Regardless, it's really annoying if I've forgotten to Ctrl-A/Ctrl-C to copy my entire message first.

Is it possible for the client-side code, when you press Preview or Post, to first copy all the user text to the clipboard? That way, if there's a problem with the request, I don't lose all that text. I can bring up an editor and get that text saved, or just restart an edit request, and dump the saved text into the entry field.

If this can be done, I'd also suggest the error page that comes up say something about the text being recoverable from the clipboard.
Image

User avatar
hk
Administrator
Posts: 10817
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Suggestion - save to clipboard when posting?

Post by hk »

I'm no expert, but do you think this would be possible on all different operating systems?
All versions of Windows, all versions of macOS, Android, Linux, etc..
Honestly, I doubt it.
Image

philiplu
Posts: 27
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Suggestion - save to clipboard when posting?

Post by philiplu »

Not a web-dev, but I suspect it is doable. Google Maps and StackExchange both manage it. On StackExchange, click the "share" link under a post/reply. It pops up a dialog with the shortened URL, and a link for "Copy link". Click that, and it'll copy the URL to your clipboard without doing Ctrl-C/Command-C/whatever. I assume that's happening client-side, but haven't looked (probably wouldn't recognize it if I did).

That works on at least Windows and iPad, and the clipboard is a reasonably cross-platform concept, so, yeah, maybe?
Image

User avatar
hk
Administrator
Posts: 10817
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Suggestion - save to clipboard when posting?

Post by hk »

There's another problem with your proposal:
automatically copying things to the user's clipboard might destroy data the user has put there for later use.
If this happens the user can rightfully complain about that.
Image

LilStalker
Posts: 73
Joined: Thu Nov 03, 2016 4:32 pm

Re: Suggestion - save to clipboard when posting?

Post by LilStalker »

Another solution might be running a bit of javascript behind and saving your post content into local storage every few seconds.
Image

User avatar
euler
Administrator
Posts: 3258
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Suggestion - save to clipboard when posting?

Post by euler »

That is a very good idea. I'm just working on an implementation now, LilStalker.
Image
impudens simia et macrologus profundus fabulae

User avatar
euler
Administrator
Posts: 3258
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Suggestion - save to clipboard when posting?

Post by euler »

So I've implemented the new system and updated the privacy policy accordingly. It would be good if some of you could check it out. I won't say too much about it, as I'm hoping it is intuitive. But essentially, if you leave a page unexpectedly or you submit the post and it is unsuccessful, then it should "remember" what you typed. The next time you edit the post or try to make a new post, it should tell you it has detected an unpublished draft and give you the option to recover it.

Please let me know if you encounter any issues. Once I've had feedback I will probably make a brief announcement in the news feed.
Image
impudens simia et macrologus profundus fabulae

philiplu
Posts: 27
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Suggestion - save to clipboard when posting?

Post by philiplu »

Thanks for considering my idea, and turning it into something with a better UX. Like I said, I'm not a web-dev :)

I'll look back over the past few problems to see if there's one I want to post on, and intentionally try to trigger the text recovery.
Image

LilStalker
Posts: 73
Joined: Thu Nov 03, 2016 4:32 pm

Re: Suggestion - save to clipboard when posting?

Post by LilStalker »

Wau! This looks great.

Testes this a bit on mobile and it seems to work well. Intentionally left the page on few different problem threads and when I revisit the page and I can recover what I had previously written there.

Great job!
Image

User avatar
euler
Administrator
Posts: 3258
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Suggestion - save to clipboard when posting?

Post by euler »

It sounds like it's working as I intended. Thank you for taking the time to test it. Much appreciated. 8-)
Image
impudens simia et macrologus profundus fabulae

MuthuVeerappanR
Posts: 450
Joined: Sun Mar 22, 2015 2:30 pm
Location: India
Contact:

Re: Suggestion - save to clipboard when posting?

Post by MuthuVeerappanR »

Great feature euler. Came in handy today.. A big thanks!!
Image
It is not knowledge, but the act of learning, not possession but the act of getting there, which grants the greatest enjoyment.

Post Reply