[Webkit-unassigned] [Bug 31413] New: Form inputs are remembered incorrectly, when using the Back button & Ajax

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 12 08:28:19 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31413

           Summary: Form inputs are remembered incorrectly, when using the
                    Back button & Ajax
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
               URL: http://www.hotelicopter.com/hotels-us-virginia-charlot
                    tesville-hotels
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bill at krues8dr.com


Created an attachment (id=43065)
 --> (https://bugs.webkit.org/attachment.cgi?id=43065)
Minimal test case of the problem.  Tar'd BZ2 includes four html files and a
copy of the Prototype Javascript library

We have a page where a user can pull up one of several different forms - these
forms are brought in through ajax when the user clicks a button - only one may
be shown at a time.  The fields in each form are named the same, but have
different values.  If you submit one of the forms, then use the back button on
the resulting page, you come back to the original page with the form options
again.  The user should then be able to select a different form and submit it,
but Safari is incorrectly remembering the values on the previously submitted
form in the new form.  This only happens in Safari, and only if the form is
actually submitted.  


I'm attaching a file of a trivial test case, it uses the Prototype js library
v1.6.1 for implementation (though the bug does not appear to be a Prototype
one).  To reproduce:

1. Load the index.html file in Safari
2. Click on the link labeled "Two" to load in the ajax_form_2.html file.  Use
the inspector to note that the hidden field has a value of "Two"
3. Click the submit button on the form.  When the result page has loaded, click
the Back button on the browser.  Note: this bug only happens if you actually
submit the form!  
4. Click on the link labeled "One" to load in the ajax_form_1.html file.  Use
the inspector again and note the value of the hidden field.

Expected: hidden field should have a value of "One", since this is a different
form and the actual from has a value of "One".

Actual: hidden field still has a value of "Two" from a different form that was
loaded previously.

You can verify the Ajax'd in forms values in the Resources pane of the
inspector, or by looking at the file - it is immediately apparent that the
values are being overwritten by some magic in the browser.  This might not
actually be a Javascript bug - could be part of the magic
form-value-remembering code.



In the url provided, the same thing occurs when using the Check Availability
link, for the hidden field hotelId.  Note that in that example, the name of the
field stays the same, though I've explicitly set a different id on each form -
this does not resolve the problem.


This issue is still occurring with the latest nightly build, r50840.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list