Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12280 closed Bug (invalid)

CKeditor content is removed and freeze when switching between jquery dialogs

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

Description

I use Jquery UI to manage some html dialog box on my webpage. In those dialog box i have some webforms using ckeditor. The issue is that the content of the CKEditor in dialog A disapears if I click on the dialog B (that basically comes to the top). If I clik back on dialog A, the CKEditor is still blank, and is no more editable.

I use jquery 1.8.2, jquery UI 1.10.3, and CKEditor 4.4.3

What can I do to make this working?

Change History (6)

comment:1 Changed 5 years ago by Jakub Ś

Keywords: jquery ui dialog removed
Status: newpending
Version: 4.4.3

Please provide reduced sample HTML page that shows this problem in code.

Do you detach DOM elements when switching between dialogs?

comment:2 Changed 5 years ago by Lionel Weber

Thank you a lot for this quick answer. I've created a sample htm file reproducing the issue. This is the link: http://portfolio.medair.org/ckeditor-jquery-example.htm

To make the bug appearing, follow those steps:

  • click on the title of dialog A
  • enter some text in the CKEditor of dialog A
  • click on title of dialog B

-> the text disapear, and both editors are blocked.

I hope a solution can be find out!

comment:3 Changed 5 years ago by Lionel Weber

Here is the code sample:

<body>
	<div id="A" class="dialog">
		<textarea name="A">
		</textarea>
	</div>
	<div id="B" class="dialog">
		<textarea name="B">
		</textarea>
	</div>
</body>

<script type="text/javascript">
$('#A').dialog({title:"A", position:"left top" });
$('#B').dialog({title:"B", position:"left+50 top+50" });
$('textarea').ckeditor({toolbarCanCollapse : true, toolbarStartupExpanded : false});
</script>
  • click on the title of dialog A
  • enter some text in the CKEditor of dialog A
  • click on title of dialog B

-> the text disapear, and both editors are blocked.

example on: ​http://portfolio.medair.org/ckeditor-jquery-example.htm

Last edited 5 years ago by Lionel Weber (previous) (diff)

comment:4 Changed 5 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

Hi,

I have just checked your files and changed your import to the ones below:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/themes/smoothness/jquery-ui.css" />

and didn't get any issues with disappearing editor content. I'm not familiar with https://portfolio.medair.org so I have to assume this is your site and need to ask if you have you modified these files? Anyway if it works with default files then I have to close this issue as invalid.

One more thing:
There is a conflict between jQuery Ui and CKEditor.
Please check this issue for two possible solutions - http://dev.ckeditor.com/ticket/10269#comment:1, http://dev.ckeditor.com/ticket/10269#comment:11
and this issue's attached samples to see them in code: http://dev.ckeditor.com/ticket/10081

comment:5 Changed 5 years ago by Lionel Weber

Hi,

well, actually you changed the version of jquery from 1.8 to 1.11, and a lot changed after jquery 1.8...

I've just updated the header with:

<script type="text/javascript" src="ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script type="text/javascript" src="ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <link rel="stylesheet" href="ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css" type="text/css" media="all" />

and the issue remains.

Can you please advise using jquery 1.8?

Many thanks Lionel

comment:6 Changed 5 years ago by Lionel Weber

ok, sorry having been not very smart. Actually even with JQuery 1.8 it works if I use jqueryui 1.11...

Upgrading to JQuery UI 1.11 is not a problem. So I will do that to fix the problem. Might be good to had a note on the website that there is an incompatibility with JQuery UI 1.10 any sub version...

Thanks

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