Open Bug 544258 Opened 16 years ago Updated 3 years ago

When reloading, an input element of type 'text' shows a value of another input.

Categories

(Core :: General, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: marco_roncatti, Unassigned)

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 (.NET CLR 3.5.30729) At first I made a page with input elements and set a value using document.getElementById("op_semana").value = "teste". After, I included more input elements and reloaded the page. Then, that value is showed on another input. Reproducible: Always Steps to Reproduce: 1. Open the page with some input elements of type 'text' and a JavaScript command document.getElementById("op_semana").value = "teste" to set a value to some input element. 2. Include more input elements before the previous elements. 3. Reload the page Actual Results: The value "teste" is showed in two input elements. Expected Results: The value "teste" must be showed only in one input element.
Version: unspecified → 3.0 Branch
Attached file An example
This page must be loaded. Then the comments must be removed and the page must be reloaded.
Attached image Page with comments
I can't replicate your screenshot, Marco. Not with Firefox 3.0 and not with the latest release, both on Windows Vista. Can you retest in safe-mode / with a new profile? http://support.mozilla.com/en-US/kb/Safe+Mode http://support.mozilla.com/en-US/kb/Basic+Troubleshooting#Make_a_new_profile
I tested in safe-mode and with a new profile. The problem happened again. I will try in Windows Vista when possible. Thank you!
I installed Firefox 3.6 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6) in a virtual machine (using VirtualBox), started it in safe-mode and the problem was the same. I guess it is a memory manager bug and my cause another problems.
Version: 3.0 Branch → 3.6 Branch
I tested on Ubuntu and the problem occured again. The build identifier is Mozilla/5.0 (X11; U; Linux x86_64; pt-BR; rv:1.9.1.3) Gecko/20091020 Ubuntu/9.10 (karmic) Firefox/3.5.7
Confirming this on 3.6.2pre: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100204 Namoroka/3.6.2pre and trunk nightly: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20100204 Minefield/3.7a1pre However, shift-reload (ctrl-shift-r) clears the duplicate values.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
Version: 3.6 Branch → unspecified
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.2pre) Gecko/20100203 Namoroka/3.6.2pre To make sure I tested this correctly: - with a new profile I loaded https://bugzilla.mozilla.org/attachment.cgi?id=425216 - I selected the word teste in the input field and pressed backspace - I clicked Reload (toolbar button) Result was that the word teste returned in the second input.
Version: unspecified → 1.0 Branch
Version: 1.0 Branch → unspecified
(In reply to comment #9) > To make sure I tested this correctly: > Result was that the word teste returned in the second input. Correct, however, you have to download the example page to disk, load it in the browser, edit the page by removing the comments and hit reload.
(In reply to comment #10) > edit the page by removing the comments and hit reload. Which is "removing comments"? (a) Activate <input>'s in comment. > <!--<input type="text" /><br /> => <input type="text" /><br /> >(snip) > <input type="text" /><br />--> => <input type="text" /><br /> (b) Delete comment which contains <input>'s. If changed to next(two active <input>, first <input> is deleted before Reload) just before reload, > <input type="text" id="op_semana" /><br /> > <input type="text" /><br /> display becomes like next after reload. > +----------------+ > | teste | <= id="op_semana" after reload, teste by onLoad script > +----------------+ > | teste | <= second <input> after reload, teste from history > +----------------+ It is done by "hisory of form" to keep user's input in form element upon Reload. As element to fill from history is selected by element number only, "teste" which was set in second <input> with id="op_semana" before reload is put in second <input> after reload. It's design of Reload since Netscape era based on static HTML. AFAIR, bug for improvement(see id/name of element in form, ...) already exists.
(In reply to comment #11) > Which is "removing comments"? To remove comments means to remove comment delimiters.
I have this problem too but on hidden fields. The browser is using an input's history in place of the actual value defined in the HTML. My HTML has a hidden field with a default value like so: [input type='hidden' id='hdn_image_file' value='img_18.jpg' /] The user uses the page runs some javascript that updates the hidden field to: [input type='hidden' id='hdn_image_file' value='cropped_img_18.jpg' /] Now we refresh the page, the HTML is the same as before, from the page source the markup of the input is: "[input type='hidden' id='hdn_image_file' value='img_18.jpg' /]" I put a handler on the page onload event to display the initial value of the hidden field, it displays "cropped_img_18.jpg". That is the value from a previous session and inspite of the HTML defining the value as "img_18.jpg".
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: