Opened 11 years ago
Closed 10 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)
Change History (14)
comment:1 Changed 11 years ago by
Summary: | Opening CKEditor in a modal window in Internet Explorer and SCYAT enabled → Opening CKEditor in a modal window in Internet Explorer and SCAYT enabled |
---|
comment:2 Changed 11 years ago by
Component: | General → UI : Toolbar |
---|---|
Version: | 4.2.2 → 4.3 |
Changed 11 years ago by
comment:3 Changed 11 years ago by
Status: | new → pending |
---|
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 11 years ago by
Attachment: | php_files.zip added |
---|
comment:4 Changed 11 years ago by
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 11 years ago by
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 11 years ago by
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 11 years ago by
Component: | UI : Toolbar → UI : Spell Checker |
---|---|
Status: | pending → confirmed |
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 11 years ago by
Attachment: | 11084.html added |
---|
comment:8 Changed 11 years ago by
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 11 years ago by
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 11 years ago by
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.
comment:11 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
The issue has been fixed in new version (v. 3) of SCAYT plugin for CKEditor.
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