Opened 9 years ago

Closed 9 years ago

#12897 closed Bug (invalid)

Link popup OK, Cancel does not work

Reported by: Debajyoti Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

I am using <script src="cdn.ckeditor.com/4.4.7/basic/ckeditor.js"></script>

with 2 instances of editor in the same page.

If link is set for first time in both of the editor it saves correctly. Page is designed like that after submit it dont refresh, instead different view is rendered which has option to edit old entry.

On next edit of link one editor shows simple link popup box, but other shows different one with more options(screenshots attached) simple one work fine after clicking OK or Cancel. But complex popup dont not respond to OK or Cancel.

If I go back and reopen the editor and open the link poupups, none of them work.

But if i refresh the page before each edit all work fine.

I believe this is a bug.

Attachments (2)

Complex Link dialog.png (23.0 KB) - added by Debajyoti 9 years ago.
Normal link dialog.png (12.3 KB) - added by Debajyoti 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Debajyoti

Attachment: Complex Link dialog.png added

Changed 9 years ago by Debajyoti

Attachment: Normal link dialog.png added

comment:1 Changed 9 years ago by Jakub Ś

Status: newpending
Version: 4.4.7

On next edit of link one editor shows simple link popup box, but other shows different one with more options

This is a link dialog with options from all tabs.

If link is set for first time in both of the editor it saves correctly. Page is designed like that after submit it dont refresh, instead different view is rendered which has option to edit old entry.

  1. "If link is set for first time in both of the editor " - please confirm that you are using only one link per page.
  2. "instead different view is rendered which has option to edit old entry" old entry is just text html so can take care of that (and it probably is). What I'm interested in how do you handle destroying/creating editor when veiw is re-rendered. By rendering I understand that part of DOM is destroyed and recreated again. If that is the case then you should destroy editor instance before destroying the DOM and create it again when view is ready.

What errors you get in Firebug console (or Chrome DevTools console) when view is rendered or when you edit links?

comment:2 Changed 9 years ago by Debajyoti

  1. No we are using multiple link for in one page.
  2. In our groovy server page for the view we set

<script src="//cdn.ckeditor.com/4.4.7/basic/ckeditor.js"></script> and create text areas like <textarea id="editor1" name="editor1" class="ckeditor">${value1}</textarea> <textarea id="editor2" name="editor2" class="ckeditor">${value2}</textarea> and before rending the view I delete CKEDITOR if exists.

if(typeof CKEDITOR == "object") {
   delete CKEDITOR;
} 
  1. error in Chrome DevTools console

Uncaught ReferenceError: CKEDITOR is not definedckeditor.js?_=1423134585158:13 CKEDITOR.editor.CKEDITOR.editor.fireckeditor.js?_=1423134585158:215 fckeditor.js?_=1423134585158:215 (anonymous function)ckeditor.js?_=1423134585158:25 (anonymous function)

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

comment:3 Changed 9 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

No we are using multiple link for in one page.

By link I understood and meant <script src="//cdn.ckeditor.com/4.4.7/basic/ckeditor.js">. You have told me that you don't use one link but your example in next poit kind of says different. What exactly did you mean by link? Please note that if you were talking about script tag calling ckeditor.js, you should use only one per page. There is no sense in importing scripts more than once.

and before rending the view I delete CKEDITOR if exists.

I think you should rather destroy editor befre submitting your view and recreate it when view is rendered again (I believe the DOM is destroyed on submit thus it would be good to clean up before destroying). By destroy I mean CKEditor.instances.instanceName.destroy(); and not delete CKEditor;.


CKEDITOR is not defined

This ihmo correcponds to point two. Most likley you are deleting CKEDITOR thus you get this error.


I'm closing this issue because I think it is implementation issue and not bug in editor. The CKEDITOR object should never be unavailable once you have imported the ckeditor.js script. @debajyoti if you don’t agree please provide reduced (to the minimum) sample application that allows reproducing this problem.

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