User-entered form data overwrites the values specified in HTML, when reloading/going back

UNCONFIRMED
Unassigned

Status

()

Core
HTML: Form Submission
UNCONFIRMED
11 years ago
3 years ago

People

(Reporter: i-senso, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Consider we have a field in a form, that has a value attribute -- let's say "This is a value...".
Consider again that we enter the following text on it -- "testing, 1, 2". If we refresh the page via F5 or Ctrl-R, we get "testing, 1, 2" instead of "This is a value..."!!
On the other hand if we post the form, we get the correct value instead of the autocompleted one.

I think this is really serious -- imagine that we are printing data from a database and letting the user change it. Let's say that, for some reason, he refreshes the page...
What happens? Some of the data will be the one on the DB and some will be the one he entered. This may show, for example, a part number with a wrong description (the part numbered he entered and the description of the part number that is on the DB on that row).


Reproducible: Always

Steps to Reproduce:
1. Enter a value on field, that as a "value" attribute;
2. Press F5;

Actual Results:  
You get the value you entered instead of the one in the "value" attribute.

Expected Results:  
Should show the value on "value" attribute, everytime. I think that the only case where it should use the autocompleted value would be when the "value" attr is omitted.

Comment 1

11 years ago
The way you describe it, this sounds like a HTML Form Submission bug.
Component: Location Bar and Autocomplete → HTML: Form Submission
Product: Firefox → Core
QA Contact: location.bar → form-submission
Summary: Fields are autocompleted when the page is refreshed, even if they a value attribute → Form fields still submit default value after user changed the value and reloaded the page
Version: unspecified → 1.8 Branch
(Reporter)

Comment 2

11 years ago
Well, than I wasn't clear enought. If we post the form all goes ok. The problem arises when we refresh the page, cause the values in the "value" attribute aren't restored.

Comment 3

8 years ago
I've just submitted Bug 576267. I think these two may be related or even the same underlying issue.

Comment 4

8 years ago
also I agree that this is a serious flaw, made even worse by the fact it's lain unresolved for three years!
Dupe of Bug 201056?

Comment 6

3 years ago
See also bug 46845, bug 891814.
OS: Windows XP → All
Hardware: x86 → All
Summary: Form fields still submit default value after user changed the value and reloaded the page → User-entered form data overwrites the values specified in HTML, when reloading/going back
Version: 1.8 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.