Closed Bug 535992 Opened 16 years ago Closed 15 years ago

input value changes, then old value in innerHTML

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: rewlad, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091219 Minefield/3.7a1pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091219 Minefield/3.7a1pre my co-worker copied a form using innerHTML. then submitted the new one. filled fields from the old one was lost. Reproducible: Always Steps to Reproduce: 1.copy html from additional info and click 2. 3. Actual Results: new, <input id="bbb" value="default"> Expected Results: new, <input id="bbb" value="new"> <body onclick="aaa()"> <form><input id="bbb" value="default"></form> <script> function aaa(){ bbb.value="new"; alert([bbb.value,document.forms[0].innerHTML]); } </script> </body>
Component: General → DOM: Core & HTML
OS: Linux → All
Product: Firefox → Core
QA Contact: general → general
Hardware: x86 → All
Version: unspecified → Trunk
Attached file reporter's testcase
Confirmed the described behavior. I see the same with all Firefox browsers. Another thing is, that it crashes on close after running it for the second time.
(In reply to comment #1) > Another thing is, that it crashes on close after running it for the second > time. Without crash report.
Sorry, ignore comment 1 and 2; it happens also without testcase :)
This is invalid. innerHTML serializes the DOM, and the DOM isn't changed on setting input.value. It would be changed if you set input.defaultValue. See <http://www.whatwg.org/html/#the-input-element>.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: