Opened 6 years ago

Closed 5 years ago

#11084 closed Bug (fixed)

Opening CKEditor in a modal window in Internet Explorer and SCAYT enabled

Reported by: Ben Owned by:
Priority: Normal Milestone:
Component: UI : Spell Checker Version: 4.0
Keywords: IE9 IE10 Cc:

Description

Hi there,

I have a simple script that opens a modal window and loads HTML using AJAX. When the modal box is closed, I send a command to destroy the editor. This is so when a new modal box is opened again, the editor can be created fresh.

Here's the code.

<textarea name="editor"></textarea>

<script type="text/javascript">
CKEDITOR.replace('editor', {
	toolbar: 'Basic',
	customConfig : 'config.js',
	height : '500',
	width : '100%'
});
$(document).bind('afterClose.facebox', function() {
	if (CKEDITOR.instances['editor'])
		CKEDITOR.instances['editor'].destroy(true);
});
</script>

This works perfectly on Safari, FireFox and Chrome. But Internet Explorer is having issues when SCYAT is enabled by default in the config.js file.

config.scayt_autoStartup = true;

The editor loads ok but is unresponsive. I have to click the 'Bold' button just to get the cursor to become active within the window which is unreliable. I have tested in IE10 and IE11.

Here is a sample with scayt_autoStartup enabled. Try opening the modal box, typing text, closing it and then repeating the process.

http://devsyndicate.com/ckeditor/index.php

Here is a sample with scayt_autoStartup disabled. Try the same process as above and you'll notice it works every time.

http://devsyndicate.com/ckeditor/index2.php

Is this a bug or is there something I should be doing differently? I like having SCYAT enabled by default so that spelling mistakes are picked up as you type.

Attachments (3)

bug.zip (4.4 KB) - added by Jakub Ś 6 years ago.
php_files.zip (558.0 KB) - added by Ben 6 years ago.
11084.html (759 bytes) - added by Piotrek Koszuliński 6 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 6 years ago by Ben

Summary: Opening CKEditor in a modal window in Internet Explorer and SCYAT enabledOpening CKEditor in a modal window in Internet Explorer and SCAYT enabled

comment:2 Changed 6 years ago by Ben

Component: GeneralUI : Toolbar
Version: 4.2.24.3

I figured due to the lack of responses that you maybe thought it was an issue with the Modalbox and shelved this issue. I've changed tact and have removed the Modalbox completely.

What I have now done is upgraded to CKEditor 4.3 and embedded the editor directly onto the page. There is a button to kill the editor which destroys it. There is then a second button that rebuilds the editor.

Here is a sample with scayt_autoStartup enabled. Try typing text in the editor, killing the editor, rebuilding the editor and typing text in the editor again. In IE (I've tested IE10 and IE11), after rebuilding the editor, you cannot type text within it.

http://devsyndicate.com/ckeditor/index3.php

Here is a sample with scayt_autoStartup disabled. Try the same process as above and you'll notice it works every time in IE10 and IE11.

http://devsyndicate.com/ckeditor/index4.php

Last edited 6 years ago by Ben (previous) (diff)

Changed 6 years ago by Jakub Ś

Attachment: bug.zip added

comment:3 Changed 6 years ago by Jakub Ś

Status: newpending

I have downloaded your files, changed them to HTML and tried them in default editor. It was working as expected.
Could you perhaps provide php files that you have? I could try them in my apache.


Perhaps this case is special only to your environment? if that is the case then perhaps simple workaround can used:

<textarea name="editor"></textarea>

<script type="text/javascript">
var edit = CKEDITOR.replace('editor', {
	toolbar: 'Basic',
	customConfig : 'config.js',
	height : '500',
	width : '100%'
});

edit.on('instanceReady', function(evt){
edit.focus();
});

$(document).bind('afterClose.facebox', function() {
	if (CKEDITOR.instances['editor'])
		CKEDITOR.instances['editor'].destroy(true);
});
</script>

Changed 6 years ago by Ben

Attachment: php_files.zip added

comment:4 Changed 6 years ago by Ben

Thanks! It does seem your solution seems to fix the problem.

http://devsyndicate.com/ckeditor/index5.php

I've attached the PHP files which will allow you to test exactly what I have. Do you mind if I ask what version of IE you tested with?

The funny thing is, it also happened on my clients machine, totally separate from mine. My windows machine is simply a test machine so I haven't really got anything on it other than browsers. I haven't added or installed anything in IE.

I wonder if anyone else out there can give it a test as well?

Thanks again for your help

comment:5 Changed 6 years ago by Jakub Ś

Do you mind if I ask what version of IE you tested with?

I have used IE10 v. 10.0.9200.16736 on windows 7. I have also got this browser strictly for testing.

I have tried your sample and I'm able to reproduce this problem there but with not with files I have attached.
I'm not sure what to think of this. It looks like some specific issue that concerns scayt and modal popup fired from apache server.
One thing I have noticed is that on second open of editor body is empty - there is no paragraph created in it.

comment:6 Changed 6 years ago by Ben

Thanks for getting back to me.

Did you end up reading my second comment by any chance after I posted (http://dev.ckeditor.com/ticket/11084#comment:2)? Sounds like you're testing the Modal Box version. I removed the Modal Box and was able to reproduce the error by creating and destroying the editor on a page. I think it would be better to test the non Modal Box version which removes the suspicion that it has something to do with the Modal Box.

In my php_files zip attachment, look at index3.php and index4.php. Can you reproduce the error there too?

And just so you know, all the editor body's are empty. It is CKEditor that puts the paragraph in so I presume when the error occurs with SCAYT, it doesn't add the paragraph.

comment:7 Changed 6 years ago by Piotrek Koszuliński

Component: UI : ToolbarUI : Spell Checker
Status: pendingconfirmed
Version: 4.3

Ok, I confirmed the issue on IE10 and I also checked that it's still valid on 4.3, plus I was able to reproduce it locally (IE10@VM opening page from host OS's Apache). The minimum setup is in 11084.html. We need to report this to the SCAYT team.

Changed 6 years ago by Piotrek Koszuliński

Attachment: 11084.html added

comment:8 Changed 6 years ago by Jakub Ś

Keywords: IE9 IE10 added
Version: 4.0

I was able to reproduce this problem only in IE9-10 (IE11 worked fine) and only when scayt_autoStartup is set to true.
I was able to reproduce this problem from CKEditor 4.0 (doesn't occur in CKE 3.x and 4.0 beta).

I have also reported this issue to SCAYT team: https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/29

comment:9 Changed 6 years ago by Ben

Thanks! Both another user and myself were unable to get it working in IE11 as well. But perhaps if they fix the older versions it will fix IE11

Thanks for submitting the ticket :)

Ben

comment:10 Changed 6 years ago by Jakub Ś

Thanks but currently it isn't clear whether this is CKEditor or SCAYT fault. My main concern is that this has started happening from CKEditor 4.0 which could indicate some change made in editor at that time. On the other hand this only occurs when scayt is enabled on startup. This needs to be investigated.

Good news is there is a workaround.

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

comment:11 Changed 5 years ago by Wiktor Walc

Resolution: fixed
Status: confirmedclosed

The issue has been fixed in new version (v. 3) of SCAYT plugin for CKEditor.

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