Form field value remembered after being modified onSubmit and then going back one page

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
13 years ago
11 years ago

People

(Reporter: Peter.Newman, Unassigned)

Tracking

1.8 Branch
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5

This behaviour is not be a bug but on first glance seems unexpected.  IE also has the same behaviour.  Everytime I hit submit and then go back and hit submit the same appended text is reappended.  Javascript:
    function validateOnSubmit() {
      var code = "_A";
      document.forms.js.subject.value = document.forms.js.subject.value + code;
      return true;
    };


Reproducible: Always

Steps to Reproduce:
1. submit
2. back
3. submit
4. back
5. submit
Actual Results:  
1. test_A
3. test_A_A
5. test_A_A_A

Expected Results:  
"test_A" every time

work around (or better programming style) is not to set the document.forms.FORM.FIELD.value from itself but best solution would be for the browser to return to state before onSubmit functions were executed!
Component: General → General
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.8 Branch

Updated

13 years ago
Component: General → History: Session
QA Contact: general → history.session

Comment 1

11 years ago
you are appending and form values are remembered on going back (by design)... so imho this is invalid.

When you go back you want to find a form in the same status you leaved it
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID

Updated

11 years ago
Component: History: Session → Document Navigation
QA Contact: history.session → docshell
You need to log in before you can comment on or make changes to this bug.