Bug Tracker

Modify

Ticket #2285 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

clone() issue with textarea

Reported by: v1nz Owned by: brandon
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.2
Keywords: clone Cc:
Blocking: Blocked by:

Description

If you clone a form which contains a textarea, then submit the cloned form, if you try to get the value of the textarea in the form's handlers (submit handler, or click handler of the submit button), the returned value is the value of the first textarea, not the cloned one!

Attachments

test.html Download (948 bytes) - added by v1nz 5 years ago.
a very simple example of the bug

Change History

Changed 5 years ago by v1nz

a very simple example of the bug

comment:1 Changed 5 years ago by brandon

  • Owner set to brandon

comment:2 Changed 5 years ago by brandon

  • Status changed from new to closed
  • Resolution set to worksforme

The text method uses the innerText property which is still the original value within the source code according to the browser. Use the more appropriate .val() method to get the value of the text area and it works as expected.

comment:3 Changed 5 years ago by flesler

  • Milestone changed from 1.2.3 to 1.2.4

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.