Opened 13 years ago

Last modified 12 years ago

#8385 confirmed Bug

Problem when switching between multiple instances of ckeditor

Reported by: ashwin Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version: 3.5.3
Keywords: IE6 IE7 HasPatch Cc: tkrah@…

Description

Script error is displayed when switching between multiple instances of ckeditor in IE7.

Steps to reproduce: 1.create multiple ck-editor instances 2.click on the other ckeditor instances other than the current one in focus.

Expected Result: Editor should be displayed Actual Result: Script error is displayed

"C.getSelection() is null or not an object"

Attachments (8)

getselection issue.JPG (49.9 KB) - added by ashwin 13 years ago.
ckeditor error.png (126.3 KB) - added by ken.chui 12 years ago.
ckeditor error screen capture
replacebycode2.html (3.8 KB) - added by Jakub Ś 12 years ago.
replacebycode.html (3.3 KB) - added by z.kwiecinski 12 years ago.
Modified standard example
sample.js (2.3 KB) - added by z.kwiecinski 12 years ago.
Additional javascript
8385-config.js (2.1 KB) - added by z.kwiecinski 12 years ago.
custom configuration
wysiwygarea-plugin-patch.js (824 bytes) - added by z.kwiecinski 12 years ago.
patch for this ticket
wysiwygarea-plugin.patch (824 bytes) - added by z.kwiecinski 12 years ago.
Patch for 8385 - tested in IE6

Download all attachments as: .zip

Change History (30)

Changed 13 years ago by ashwin

Attachment: getselection issue.JPG added

comment:1 Changed 13 years ago by Jakub Ś

Status: newpending

If you check out samples folder from the downloaded CKEditor zip, you will find there "replacebycode" sample or "Replace DIV elements on the fly". Both of these samples use multiple instances of CKEditor and none of them have error you have described.

Could you tell me:

  1. Are you able to reproduce the issue in our sample pages or in ckeditor demo? If the issue is reproducible only in your webapp than this might be due to your custom changes you have made or your webapp custom configuration.
  2. You may have found a bug, which to fix we first have to reproduce. Are you able to prepare a reduced test case file (html page) which shows a problem or at least provide detailed step by step scenario that allows to reproduce the issue in our demo pages?

comment:2 Changed 13 years ago by Jakub Ś

@ashwin have you got any updates regarding this issue?

Changed 12 years ago by ken.chui

Attachment: ckeditor error.png added

ckeditor error screen capture

comment:3 Changed 12 years ago by ken.chui

Found the same issues in our system with single instance of CKeditor in IE7.

CKeditor version :3.6.1
Error Message:
Line: 99
Char: 2301
Error: 'C.getselection()' is null or not an object
Code: 0

Version 1, edited 12 years ago by ken.chui (previous) (next) (diff)

comment:4 Changed 12 years ago by Jakub Ś

Found the same issues in our system with single instance of CKeditor in IE7.

Are you able to reproduce them out side of your system E.g. on CKEditor demo page http://ckeditor.com/demo? Would it be possible to provide a simple test case file in which those problems can be reproduced?

comment:5 in reply to:  4 Changed 12 years ago by ken.chui

Replying to j.swiderski:

Found the same issues in our system with single instance of CKeditor in IE7.

Are you able to reproduce them out side of your system E.g. on CKEditor demo page http://ckeditor.com/demo? Would it be possible to provide a simple test case file in which those problems can be reproduced?

The problem should happen on multiple instance of CKeditor in IE7, we have found another two instances running on the same page.

comment:6 Changed 12 years ago by Jakub Ś

@ken.chui - I'm not getting any error but perhaps I have missed something.

Could you tell me if the bug is reproducible in one of CKEditor samples in latest nightly build http://nightly.ckeditor.com/demo and what are the exact steps to reproduce the issue?

If the issue is not reproducible in samples would it be possible to prepare a reduced test case file showing the problem?

comment:7 Changed 12 years ago by z.kwiecinski

Hi. I have this problem too. It occur when one or more instances ckeditor are initially hidden (eg style display none). When every instances are showing at start, its work fine.

comment:8 Changed 12 years ago by Jakub Ś

@z.kwiecinski or @ken.chui or @ashwin any chance for a reduced test case file (sample html file) showing the problem? I'm talking about an example in code here.

comment:9 Changed 12 years ago by z.kwiecinski

You can get example replacebycode.html from 3.6.2 version. Replace line 64 by text:

<input type="button" value="test it" onclick="document.getElementById('xxx').style.display='block';"/> <p id="xxx" style="display: none;">

Check this in IE6

Changed 12 years ago by Jakub Ś

Attachment: replacebycode2.html added

comment:10 Changed 12 years ago by Jakub Ś

@z.kwiecinski I did what you have asked me:

  1. modified replacebycode sample,
  2. did some changes inside editor one,
  3. clicked the button and clicked inside editor two. I have even done some changes but no error popped up neither in IE7 nor in IE6 nor in any other IE.

Now have I done something wrong in my TC, missed something?
Are you using your IE with any plugins which might collide with CKEditor?
Is the issue reproducible in plain/vanilla CKEditor or only inside your application just like @ken.chui (He didn't deny that this is happening only in his application).

comment:11 Changed 12 years ago by z.kwiecinski

Hi. Its more complicated I imagine. This example work in IE. In my project very similiar function doesn't work. I'll prepare working example with this exception and send you.

My IE is without any plugins, JSP WEB aplication are deployed on JBOSS 4.2.1 server.

comment:12 Changed 12 years ago by z.kwiecinski

Error is in my config file. When ckeditor is initialized standard config file, everything is ok, but when use my own file, something is wrong.

Changed 12 years ago by z.kwiecinski

Attachment: replacebycode.html added

Modified standard example

Changed 12 years ago by z.kwiecinski

Attachment: sample.js added

Additional javascript

Changed 12 years ago by z.kwiecinski

Attachment: 8385-config.js added

custom configuration

comment:13 Changed 12 years ago by z.kwiecinski

Hi. Its working example, testen in IE6 without any application server. Put these files in ckeditor/_samples, replace two original files.

Last edited 12 years ago by z.kwiecinski (previous) (diff)

comment:14 Changed 12 years ago by Jakub Ś

@z.kwiecinski I hate to bring bad news but again I was not able to reproduce the issue.

Is there any special test case scenario that I should follow?
Is the issue always reproducible or only sometimes on random basis?

Finally @z.kwiecinski or @ken.chui or @ashwin we have one ticket similar to yours #7561. Perhaps this is the source of your problems?
If you all are getting the same error then could I ask you to try to apply the proposed code (the one from post and it that doesn't work the one from comment 7)change and see if it works for you?

comment:15 Changed 12 years ago by z.kwiecinski

I don't know why You cant reproduce this. I check this example in english and polish version IE6. IE8 works fine (without error), IE7 not tested.

#7561 rights, describe cause and present solution in comments (not in a attached patch).

Changed 12 years ago by z.kwiecinski

Attachment: wysiwygarea-plugin-patch.js added

patch for this ticket

Changed 12 years ago by z.kwiecinski

Attachment: wysiwygarea-plugin.patch added

Patch for 8385 - tested in IE6

comment:16 Changed 12 years ago by Jakub Ś

I don't know why You cant reproduce this. I check this example in english and polish version IE6

Perhaps the test scenario I have applied was not correct. Could I ask you for a step by step scenario of what should I do in IE6 to get this JavaScript Error?

#7561 rights, describe cause and present solution in comments (not in a attached patch).

I don't quite understand what do you mean by "#7561 rights". Could you clarify?

comment:17 Changed 12 years ago by Jakub Ś

@z.kwiecinski could I ask you for any update regarding my last comment?

I'm not saying that there is no error but we need to reproduce it first to see exactly what is wrong so any extra information are welcome.

As I have said before - perhaps I have missed something in my steps thus I have asked you for a step by step scenario to reproduce the ticket.

Also I didn't understand what did you meant by

#7561 rights, describe cause and present solution in comments (not in a attached patch).

Any clarifications are welcome.

comment:18 Changed 12 years ago by z.kwiecinski

I get latest wersion ckeditor from http://ckeditor.com/download, then applay attached files (without patch). In IE6 open _samples\index.html (in my location is E:\ckeditor\WebContent\CKeditor\_samples\index.html). Choose second example (replacebycode.html), refresh page by pressing CTRL-F5 and click button "test it". IE must check option "Display notification about every script error". When I use ckeditor source (<script type="text/javascript" src="../ckeditor_source.js"></script>) and aply patch for #7561 or path attached in this ticked, exception is not showing.

This exception occurs in IE6, IE8 work goot, IE7 was not tested - my client still use IE6.

comment:19 Changed 12 years ago by Jakub Ś

Keywords: IE6 IE7 added
Status: pendingconfirmed
Version: 3.6.23.5.3

@z.kwiecinski thank you very much for the TC I have managed to reproduce the issue.

Issue has been reproducible in IE6 and IE7 from CKEditor 3.5.3

To Reporduce:

  1. Download and copy 3 files from test.zip into samples folder
  2. Open replacebycode2.html and press F5 few times. Two times should be enough. Just do it slowly, press F5 and when page reloads press F5 one more time.

JS Error will pop out.

comment:20 Changed 12 years ago by Jakub Ś

This issue is possible duplicate of #7561

comment:21 Changed 12 years ago by Jakub Ś

Keywords: HasPatch added

comment:22 Changed 12 years ago by tkrah

Cc: tkrah@… added
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