Bug Tracker

Modify

Ticket #7482 (closed bug: patchwelcome)

Opened 3 years ago

Last modified 2 years ago

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

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

Description

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

 http://jsfiddle.net/xMwAE/25/

Change History

comment:1 Changed 3 years ago by ajpiano

  • Keywords needsreview added
  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to attributes

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?

comment:2 Changed 2 years ago by dmethvin

  • Status changed from open to closed
  • Resolution set to patchwelcome

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.

comment:3 Changed 2 years ago by dmethvin

  • Keywords needsreview removed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.