[RFC|Rejected] warn user on closing edtior when text changed

These RFCs were either rejected or have been replaced by an alternative proposal. They will not be included in phpBB.
User avatar
emosbat
Registered User
Posts: 43
Joined: Fri Aug 24, 2012 8:49 am

[RFC|Rejected] warn user on closing edtior when text changed

Post by emosbat » Wed Nov 07, 2012 11:35 am

using a simple javascript code warn user when try to close editor window and didn't posted or saved its content so give him a last chance to post/save it. this could be possible by simething like this code:

Code: Select all

<script type="text/javascript">

window.onbeforeunload = function()
{
   if(text_changed)
       return "You didn't posted your message blah blah blah  :mrgreen: ";
}

</script>


User avatar
Jacob
Registered User
Posts: 100
Joined: Wed Jan 04, 2012 1:41 pm

Re: [RFC] warn user on closing edtior when text changed

Post by Jacob » Wed Nov 07, 2012 12:39 pm

I don't like it. If I don't post/save something I'm fully aware of it, I don't need to be reminded.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] warn user on closing edtior when text changed

Post by callumacrae » Wed Nov 07, 2012 5:08 pm

That's the browsers job. Some of them do.
Made by developers, for developers!
My blog

User avatar
emosbat
Registered User
Posts: 43
Joined: Fri Aug 24, 2012 8:49 am

Re: [RFC] warn user on closing edtior when text changed

Post by emosbat » Wed Nov 07, 2012 5:36 pm

callumacrae wrote:That's the browsers job. Some of them do.
not a full job without help of coders :mrgreen:

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] warn user on closing edtior when text changed

Post by Arty » Wed Nov 07, 2012 8:31 pm

Please no. That's one of the most annoying functions on some forums that do use it.

If I changed my mind when posting and decided to close browser tab, I did that on purpose. I don't want script to second guess my decision.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] warn user on closing edtior when text changed

Post by imkingdavid » Wed Nov 07, 2012 9:52 pm

Arty wrote:Please no. That's one of the most annoying functions on some forums that do use it.

If I changed my mind when posting and decided to close browser tab, I did that on purpose. I don't want script to second guess my decision.
+1
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Senky
Extension Customisations
Extension Customisations
Posts: 283
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] warn user on closing edtior when text changed

Post by Senky » Thu Nov 08, 2012 4:24 pm

-1 to RFC - nowadays, all modern browsers restore text even when you re-open window.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] warn user on closing edtior when text changed

Post by callumacrae » Thu Nov 08, 2012 5:56 pm

Senky wrote:-1 to RFC - nowadays, all modern browsers restore text even when you re-open window.
Not with HTTPS, though.
Made by developers, for developers!
My blog

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: [RFC] warn user on closing edtior when text changed

Post by wGEric » Thu Nov 08, 2012 7:43 pm

Arty wrote:If I changed my mind when posting and decided to close browser tab, I did that on purpose. I don't want script to second guess my decision.
There are cases when you accidentally close a tab. Many times I've hit cmd + q instead of cmd + w. Restore previous session is one of my favorite features.

Auto drafts or something like that would probably be a better way to prevent posts from being lost. That way it doesn't annoy the user.
Eric

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] warn user on closing edtior when text changed

Post by nickvergessen » Thu Nov 08, 2012 8:58 pm

-1 from me aswell
Member of the Development-TeamNo Support via PM

Post Reply