Opened 9 years ago

Closed 8 years ago

#6463 closed Bug (expired)

Link dialog dont work in ajax call

Reported by: holyguard Owned by:
Priority: Normal Milestone:
Component: General Version: 3.4.2
Keywords: Cc: webmaster@…

Description

steps:

1 - Call ckeditor external page into main page with jquery load(url) 2 - open the link dialog, all works well 3 - call other external page 4 - call the ckeditor for the second time 5 - open the dialog, now the hidden elements are all visible in the dialog and is not possible to insert the link (the insert button dont work)

reloading the main page all came back to the step 1

Attachments (1)

link.jpg (49.4 KB) - added by holyguard 9 years ago.
link dialog with bug

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by holyguard

Attachment: link.jpg added

link dialog with bug

comment:1 Changed 9 years ago by Garry Yao

Status: newpending

Hi holyguard could you provide a sample test page with the jQuery environment you have there.

comment:2 Changed 9 years ago by holyguard

Cc: webmaster@… added

comment:3 Changed 9 years ago by Alfonso Martínez de Lizarrondo

It seems that the code is loading and initializing CKEditor again on each ajax call.

comment:4 Changed 9 years ago by holyguard

Yes, it is, but if i don't include the code in every page the editor is not loaded. I tried to destroy the editor , but nothing changed.

comment:5 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Status: pendingconfirmed

Due to the jQuery layer this is much harder to debug than a normal javascript testcase (I'm not even gonna try to do it), but I don't think that you really need to load all the javascript files again.

In any case, CKEditor should detect that it has already been initialized and skip that step if it's loaded again.

comment:6 Changed 9 years ago by holyguard

I deleted the javascript files from the internal pages but the bug is persistent. http://www.abruzzoweb.it/test/editor/index.php

I added the following control to check if the editor is initialized:

$(function(){ if ($('.jquery_ckeditor').ckeditor()){

alert('ready');

} else {

$('.jquery_ckeditor').ckeditor();

}

});

but this not work, is there a specific function that can check if the editor is iitialized?

Anyway it seems to be an error in the link dialog plugin

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

Version: 3.5 (SVN - 3.5.x)3.4.2

comment:8 Changed 9 years ago by Alfonso Martínez de Lizarrondo

Status: confirmedpending

This might have been fixed with #7588

Can you update to 3.5.4 or 3.6 and verify if now works?

comment:9 Changed 8 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed

I added the following control to check if the editor is initialized:

$(function(){ if ($('.jquery_ckeditor').ckeditor()){

A quick look at adapters/jquery.js and you can find there a ckeditorGet() function.
Another option is assigning created editor to variable and do checks and operations on it.

Looks more to me like user error the CKEditor bug.
Since I was not able to reproduce this and user didn’t reply for a long long time I’m closing this issue as expired.

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