Confirm before leaving post page with content
I would like to see an option for the user and the admin to turn on an alert before you leave any page with a post field to ask if you want to leave the page.
Re: Confirm before leaving post page with content
Reply #1 –
Nothing like a little data loss to get someone going ... Github seems to do a really good job retaining data even when the back button is pressed. I'd assume they are using some data fields on the JS side to save and track things.
Anyway could do a simple confirm box as a start.
Re: Confirm before leaving post page with content
Reply #2 –
I have people "lose posts" a lot on my forum. I'm 99% certain the reason is the "Someone posted while you were typing" warning. Unfortunately that warning shows up below the preview that is returned. So if you're on a phone or tablet with a limited display you see the post you just made (actually the preview of it) and not the warning box. Since most people have it set to return to the post they made they never realize their post didn't go through and they move on, close their browser, etc. and the post is lost.
Even without the leave page warning I think there should be consideration of moving the error box above the post preview when there is a posting error so that it's actually visible and doesn't look at casual glance like the post went through as normal. It's especially prone to fool people when they enter long replies, which are the most annoying ones to lose.
Re: Confirm before leaving post page with content
Reply #5 –
Not showing the preview when there are errors would probably be a good thing.
As to drafts, I think it should not be the only mechanism. Especially since I've had it not save drafts in the very case I mentioned. I'm not quite sure what the draft logic is about when it saves it and when it deletes it. I seem to get a lot of drafts hanging around of posts that were successfully posted. Thankfully the delete after x days option cleans them up eventually.
Re: Confirm before leaving post page with content
Reply #6 –
Happens with my board too.
Re: Confirm before leaving post page with content
Reply #10 –
I like the idea of not showing the preview when bounced back. The page will obviously be different that way and the error will be at the top as you say.
Re: Confirm before leaving post page with content
Reply #11 –
for 1.0.4 I removed the preview call when coming from a post2 error (error after you hit the post button). Also added a JS scroll so the error box is at the top of page, should make it evident there was an issue.
Re: Confirm before leaving post page with content
Reply #13 –
Drafts can (admin setting) be auto-saved on "lost-focus" of the text area.
The autoloading of the draft is something I suggested a while ago (can't find the discussion as usual), I think it would be very cool!