Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8151 closed bug (invalid)

Assignment using val() behaves differently for textfields than it does for hidden textfields.

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: 1.next
Component: attributes Version: 1.5
Keywords: Cc:
Blocked by: Blocking:


Show the original value of a text box


sample output: "Jimmy"

Here's where I see inconsistent behavior. Changing the field using .val() shouldn't modify the original value -- regular text boxes work as expected but hidden fields do not.


If #firstName is <input type="text"/> then this returns "Jimmy" which is correct.

If #firstName is <input type="hidden"/> then this returns "Drew" which is incorrect.

Change History (3)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledattributes
Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.

comment:2 Changed 12 years ago by Rick Waldron

Resolution: invalid
Status: pendingclosed

comment:3 Changed 12 years ago by jitter

Priority: undecidedlow
Note: See TracTickets for help on using tickets.