Skip to main content

Bug Tracker

Side navigation

#7482 closed bug (patchwelcome)

Opened November 12, 2010 09:42AM UTC

Closed December 24, 2010 05:04AM UTC

Last modified December 24, 2010 05:06AM UTC

.html() does not work when <input type="text"> is updated

Reported by: Owned by:
Priority: low Milestone: 1.5
Component: attributes Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

This should explain it all. Look at the alert, it's not displaying what is expected.

Attachments (0)
Change History (3)

Changed November 12, 2010 03:17PM UTC by ajpiano comment:1

component: unfiledattributes
keywords: → needsreview
priority: undecidedlow
status: newopen

When you set the value of an input element using .val() (or elem.value), you are updating a DOM property, not an HTML attribute. This issue comes up frequently. As to just why .val() is so anomalous, I cannot provide a great answer at the moment. I am not sure if this is something that is "fixable" with jQuery or if it is an issue inherent to this particular property. Perhaps someone else can provide some illumination?

Changed December 24, 2010 05:04AM UTC by dmethvin comment:2

resolution: → patchwelcome
status: openclosed

This is a problem similar to #3016 and #1736; dynamic values are not guaranteed to be copied when nodes are cloned or serialized to a string. All the general fixes would be horribly complex to implement but if you have a breakthrough idea let us know.

Changed December 24, 2010 05:06AM UTC by dmethvin comment:3

keywords: needsreview