Bug 56188 - [test case] dhtml causes form corruption when going back to previous page.
Summary: [test case] dhtml causes form corruption when going back to previous page.
Status: RESOLVED LATER
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: 3.5
Platform: Mandrake RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 74343 138905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-20 21:48 UTC by Jon Gabrielson
Modified: 2008-04-21 10:20 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
test case (527 bytes, text/html)
2004-11-10 21:07 UTC, Stephan Kulow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Gabrielson 2003-03-20 21:48:32 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Mandrake RPMs
OS:          Linux

By clicking on the link a couple times, then clicking on submit, then clicking the back button,
the submit button is corrupted.

<html>
 <a href=# onclick=displayfrequency()>corruptform</a>

 <form action=http://www.google.com/" METHOD=GET>
 <span id="spanfrequency">
 <select name="frequency2">
 <option value="15">Every 15 minutes
 </select>
 </span>
 <input type=submit value="SUBMIT">
 </form>

 <script> 
 function displayfrequency() 
 { 
 spanfrequency.innerHTML = 
 "<select name=\"frequency\">" + 
 "<option value=\"15\">Every 15 minutes" + 
 "<option value=\"30\">Every 30 minutes" + 
 "</select>"; 
 } 
 </script>
Comment 1 Stephan Kulow 2004-11-10 21:07:47 UTC
Created attachment 8240 [details]
test case

excellent test case. I saw it before, but never could reproduce it reliable
Comment 2 Maksim Orlovich 2006-02-09 02:24:08 UTC
As far as I can see, the restoration code simply can't handle stuff being added to document in order other than parse order. Now, the DOM proper doesn't trigger the problem because the parser isn't involved, but innerHTML  uses the parser, of course. I think Apple actually has a solution for this --- 
http://www.cs.cornell.edu/~maksim/WC/changesets/1503.html
(later amended to not restore passwords wrong) --- the core idea is nice, though I am not sure I like the implementation details.
Comment 3 Maksim Orlovich 2006-03-11 19:12:46 UTC
*** Bug 74343 has been marked as a duplicate of this bug. ***
Comment 4 Maksim Orlovich 2006-12-17 16:55:02 UTC
*** Bug 138905 has been marked as a duplicate of this bug. ***
Comment 5 Werner 2008-03-13 23:52:14 UTC
for what it's worth: since a few days my favourite site http://www.google.com/advanced_search is broken with konqueror (on different linux systems). I guess google has started using content konqueror can't deal with. Just enter any search term, press enter (all fields are ignored in my case but that might as well be another bug), press back button => some fields contain "...X", "X..." and other garbage.
Comment 6 Maksim Orlovich 2008-03-14 18:34:40 UTC
Ugh. I guess I can't defer this one any more..
Comment 7 Maksim Orlovich 2008-03-25 17:32:14 UTC
SVN commit 789902 by orlovich:

Be more careful not to make a mistake when restoring form entries.
Still imperfect, but I am not sure what perfect means here..
CCBUG:56188


 M  +8 -5      html/html_formimpl.cpp  
 M  +2 -4      html/htmlparser.cpp  
 M  +40 -10    xml/dom_docimpl.cpp  
 M  +4 -1      xml/dom_docimpl.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=789902
Comment 8 Maksim Orlovich 2008-03-25 18:12:17 UTC
SVN commit 789918 by orlovich:

automatically merged revision 789902:
Be more careful not to make a mistake when restoring form entries.
Still imperfect, but I am not sure what perfect means here..
CCBUG:56188

 M  +8 -5      html/html_formimpl.cpp  
 M  +2 -4      html/htmlparser.cpp  
 M  +40 -10    xml/dom_docimpl.cpp  
 M  +4 -1      xml/dom_docimpl.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=789918
Comment 9 Michael Leupold 2008-04-06 08:01:58 UTC
Works in trunk r794020.
Comment 10 Michael Leupold 2008-04-09 12:55:38 UTC
Still present in 3.5.9
Comment 11 Eduardo Robles Elvira 2008-04-20 20:48:24 UTC
Can't reproduce in trunk 799157
Comment 12 Michael Leupold 2008-04-21 10:20:24 UTC
As this bug is fixed in recent releases it's being closed. Setting it to LATER because it does qualify for backporting to the 3.x branch.