Form input element's 'value' attribute and 'value' property do not synchronize

RESOLVED DUPLICATE of bug 277899

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 277899
12 years ago
12 years ago

People

(Reporter: Weston Ruter, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

A form control's 'value' HTML attribute and its 'value' DOM property are not linked consistently. In IE6, the two values are always the same; in Opera, changing the 'value' DOM property does not synchronize with the 'value' attribute, but setting the 'value' property always updates the associated attribute; Mozilla's behavior is even worse than Opera (unless IE's behavior is itself an error). If only the value attribute is changed the values continue to be synchronized (as in Opera), but as soon as the 'value' property is set, then the link is broken and thereafter setting the 'value' attribute will not update the 'value' property.

Reproducible: Always

Steps to Reproduce:
1. Change the input's value attribute
2. Change the input's value property
3. Compare input.value and input.getAttribute('value') and notice they are different

Actual Results:  
input.value and input.getAttribute('value') are not identical

Expected Results:  
input.value and input.getAttribute('value') should always produce the same value

Possibly related to Bug 111486.
No, The spec says that changing .value should not affect the attribute. IE is disobeying the spec.


*** This bug has been marked as a duplicate of 277899 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.