Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#8530 closed Bug (invalid)

jQuery adapter breaks save button

Reported by: Tim Owned by: Garry Yao
Priority: Normal Milestone:
Component: General Version: 3.1
Keywords: Cc:

Description

When using the jQuery adapter's .ckeditor() function, the save buttons of editors created in that way are broken. The button seems to work correctly, but the text that is submitted is whatever text was in the textarea before it was replaced by an editor.

A workaround is to do

CKEDITOR.replace($(element).attr('id'), opts)

but that kindof defeats the whole purpose of the jQuery adapter.

Attachments (1)

8530.patch (1.1 KB) - added by Garry Yao 12 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by Jakub Ś

Keywords: jquery removed
Status: newconfirmed
Version: 3.6.23.1

I'm kind of surprised that no one has reported this issue earlier.

Seems that toolbar Save button doesn't send updated contents (can be checked with Firebug in Net tab) to the editor but only the default text.
Just to compare, submit placed button under the editor works as expected.

Issue has been reproducible from CKEditor 3.1 (when jQuery adapter was introduced).

Last edited 12 years ago by Jakub Ś (previous) (diff)

Changed 12 years ago by Garry Yao

Attachment: 8530.patch added

comment:2 Changed 12 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

comment:3 Changed 12 years ago by Jakub Ś

I just had a quick look at the patch and it seems to solve this particular issue.

I had hope that it will also solve #6906 but that would be to beautiful :

comment:4 Changed 12 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

On the review, I started with the presupposition that there must be a reason to have that autoUpdateElementJquery hack there and so we should not simply remove it.

I've reached the original ticket for that (#4210), which doesn't clearly explains the reason but gives an idea for it.

In fact, after that, I was able to confirm that after patch editor.updateElement is being called twice when submitting the form. To test it, I've just added a alert( 'UPDATE!' ) call inside that function.

We must definitely avoid that.

comment:5 Changed 11 years ago by Piotr Jasiun

Resolution: invalid
Status: review_failedclosed

comment:6 Changed 11 years ago by Piotr Jasiun

This bug has been fixed during general jQuery adapter bug fixing #10281.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy