Last Comment Bug 290474 - I should never lose my edits
: I should never lose my edits
Status: RESOLVED WORKSFORME
:
Product: Toolkit
Classification: Components
Component: Form Manager (show other bugs)
: unspecified
: All All
: -- major with 5 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-15 08:36 PDT by Fergal Daly
Modified: 2009-07-10 14:46 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Fergal Daly 2005-04-15 08:36:43 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Firefox should capture all of my edits and make them available to me at least
for the current session or until I tell it to forget them.

It's a cardinal sin for an app to throw away the users hard work and I can't
think of any editor that would let a user quit without a prompt to save their
unsaved work but web browsers do it all the time.

I'd like to a see a feature where anything I've typed is preserved so that if I
accidentally lose it (by moving off the page or whatever) I can get it back.
I've lost plenty of emails in internet cafes because of this sort of thing.

A nice interface would be when I right click on a text area (say it's name is
"mailbody"), I have an opportunity to select previous chunks of text that I have
typed. I should be able to access text that has been entered into "mailbody"
before but I should also be able to select text that has been entered into any
other field.

This is kind of like form manager but not really, I don't want to automatically
populate fields, I just want to be able to recover previously typed text.

One could argue that there are privacy issues here (when people share a machine
for example) but if it defaults to only remembering text for the duration of the
session then it's no worse than cookies.


Reproducible: Always
Comment 1 Phil Ringnalda (:philor) 2006-10-18 21:14:28 PDT
*** Bug 357206 has been marked as a duplicate of this bug. ***
Comment 2 seggluk 2006-10-19 12:15:16 PDT
OMG, this is a never resolved ancient bug report/major feature request.
This is why Firefox never grow up to opera.
And the speed.
Comment 3 martin 2007-10-20 15:07:56 PDT
I think this bug has some very good points. Can't someone assign a student to work on this for next years summer of code, or something?
Comment 4 Nicolas Alvarez 2007-10-20 15:27:58 PDT
I disagree with this particular method (keeping data). I'd prefer it to show a prompt. When you change page (whatever way: going back in history, bookmark, clicking a link, etc) or close tab after typing on a form, it should ask first.
Comment 5 martin 2007-10-20 15:57:46 PDT
Yes, you are right. There might be many different ways, but *some* kind of mechanism for preventing accidental data loss would be nice.
Comment 6 Fergal Daly 2007-10-20 16:02:01 PDT
Re: #4 Nicolas Alvarez

The reason I didn't suggest a prompt it because it could be quite clumsy, requiring extra actions by the user just to navigate off forms (it might be difficult to tell for example whether an edit was worth alerting about, perhaps javascript messing with field values would look like user edits etc).

I agree though that retaining values also has its downsides, for example from a privacy/security POV. That said, you cannot assume that just because Firefox has made your edits inaccessible to you that they have been securely destroyed. I have on multiple occasions used a script to dump out Firefox's memory image and then recovered my "lost" text from it.

In the end, I don't care too much about how to do it, mine is only a suggestion, anything which prevents the accidental loss of my data without being so annoying that I want to it off is fine by me.
Comment 7 Wayne Mery (:wsmwk, NI for questions) 2007-11-11 06:13:26 PST
I'm having trouble understanding exactly what you want. perhaps answers to these questions will clarify:
- you only care about input fields, not selects and other "states" within the form?  (suggest don't complicate what you want with how difficult implementation might be) 
- you don't want to be prompted about losing data from closing tabs or windows, so why do you consider the current behavior to be major?
- you have "remember what I type in form and addressbar" checked on?
- are you aware that closing FF will save data and restore it on restart?  (parts of this may be FF 3 only)
- please give a step by step example of how you want this to work, with a specific URL
Comment 8 Fergal Daly 2007-11-11 08:16:41 PST
The reason I don't care as much about select states is that I have never sat in an internet cafe working on select states only to lose them because of a server-side error. I can imagine that this could happen so feel free to solve that too if you like.

I don't want to be prompted every time I navigate away from a page, that would be very annoying and most people would probably want to turn it off (myself included). So any solution that involves that is self-defeating. Also, it does not fix the session-expired scenario (see yahoo mail example below).

I consider it major because I and many others have lost many hours of work due to the current behaviour. That said, I do believe that mozilla/firefox have improved in this area since I filed this bug, crash recovery etc.

Yes, I have checked that box (I didn't actually know it existed before now but it was checked when I looked).

Step-by-step example: 

Go here

http://dyn.fergaldaly.com/~fergal/mozilla-edit/email.html

type something in

submit

read the error

click back

what you typed is gone forever.

Many apps do the equivalent of this, yahoo mail definitely used to do that sort of thing, I lost several mails because my session timed out during email composition. When I clicked send I got a session expired error and when I clicked back, I got a session expired error.

You could argue that these apps are wrong/stupid and you'd be correct, however the world will always be full of stupid apps and with everyone doing AJAX, writing apps that do not suffer from this is getting harder, not easier.

All I want is for my browser to give me some protection from this by remembering what was in my textareas.

Even if it just remembered the contents of the last N forms it would help. Maybe N=1 is enough maybe 2 or more is desirable. Maybe it needs to be per tab to avoid clicking, switching tab, filling out some more forms, and then finding out that the earlier submit went bad and the form contents are already gone from memory.
Comment 9 Wayne Mery (:wsmwk, NI for questions) 2007-11-11 11:19:38 PST
testcases are a great way to demonstrate and attack a problem, especially since you cite several different scenarios that might cause this problem. But your URL+testcase for this one issue works for me - perhaps it doesn't accurately simulate the problem?  Or you and I have different setting?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6



Comment 10 James Youngman 2007-11-11 11:55:55 PST
It also works for me, but only if I check the "remember what I type in forms and the adress bar" preference.   It's in the Privacy tab of the Iceweasel preferences.   It's probably also present in Mozilla.


Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071004 Iceweasel/2.0.0.8 (Debian-2.0.0.8-1)
Comment 11 Fergal Daly 2007-11-11 12:11:29 PST
Could y'all clarify what you mean by "work"? Does the test successfully illustrate loss of edits or does firefox preserve your edits?
Comment 12 Michael Buttrey 2007-11-19 18:16:35 PST
Would fixing this relieve some of the anger over bug 108816?
Comment 13 Justin Dolske [:Dolske] 2008-09-04 23:12:27 PDT
Session restore largely resolves this problem. Adding annoyance UI for uncommon situations isn't the answer.
Comment 14 Fergal Daly 2008-09-05 02:47:59 PDT
Justin, with respect, I don't think you fully read this bug. The complaint was not about losing edits through crashes so session restore is not relevant. Also, nobody asked for an annoyance UI, in fact I said "I don't want to be prompted every time I navigate away from a page, that would be very annoying".

It is still very possible to lose edits in normal usage.

Here are 2 other ways to lose edits (tested on ff3.0).

1 Type something into a form, then change character encoding, everything you typed will be lost (yes I know there is a long bug about character encoding and reloading the page but that's not the point, user data is irrevocably thrown away).

2 Type something into a form, close the tab, "undo close tab". Everything is gone.

It seems that anything that causes a full reload of the page will throw away all form data, whether the reload is due to a bug/feature in the browser or due to bad site design.

It should always should be possible to recover my data, at least up to the end of a session.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8) Gecko/2007100620 GranParadiso/3.0a8
Comment 15 Michael Buttrey 2008-09-16 14:22:25 PDT
Basically https://addons.mozilla.org/en-US/firefox/addon/6984, but with better default security & privacy settings.
Comment 16 Justin Dolske [:Dolske] 2009-07-10 14:46:45 PDT
(In reply to comment #14)

> Here are 2 other ways to lose edits (tested on ff3.0).

Both of these ways WFM, although on HTTPS sites (like bugzilla) you need to flip the browser.sessionstore.privacy_level to "0". See also bug 424872. So, calling this WFM.

I think anything beyond this is just going be be WONTFIX, though. If you want to save intermediate edits and/or change how data is (not) persisted across reloads, that's likely something for an extension to handle (ala comment 15).

Note You need to log in before you can comment on or make changes to this bug.