Opened 7 years ago

Closed 4 years ago

#7876 closed Bug (fixed)

jQuery Adapter val() function handles multiple elements incorrectly

Reported by: mridgway Owned by: Piotr Jasiun
Priority: Normal Milestone: CKEditor 4.2
Component: General Version: 3.1
Keywords: Cc:

Description

My understanding is that if you have a jQuery object that contains multiple form elements, when you call val() it will return the first element's value. (I haven't found anything in the documentation that says this specifically, but it seems to be the case)

The jQuery adapter loops through each of the wrapped elements calling val(), replacing the returned result each time. This ends up returning the last element's value.

I'm using an older version of the code, but a quick comparison of the trunk's source indicates that it has the same problem.

Attachments (1)

test.html (2.2 KB) - added by Jakub Ś 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by Sa'ar Zac Elias

Keywords: jquery removed
Status: newconfirmed
Version: 3.4.13.1

Changed 6 years ago by Jakub Ś

Attachment: test.html added

comment:2 Changed 6 years ago by Jakub Ś

I'm attaching test case file. I'm not sure if this is what @mridgway meant but if I understood the description correctly then the problem does not exist anymore.

Can anyone confirm, give his point of view?

comment:3 Changed 4 years ago by Jakub Ś

#10480 was marked as duplicate.

comment:4 Changed 4 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedreview

comment:5 Changed 4 years ago by Piotr Jasiun

Milestone: CKEditor 4.2

comment:6 Changed 4 years ago by Piotr Jasiun

in branch/ticket #10281

comment:7 Changed 4 years ago by Piotr Jasiun

Status: reviewassigned

comment:8 Changed 4 years ago by Olek Nowodziński

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy