#9807 closed Bug (invalid)
CKEditor throws error when <iframe> present on page
Reported by: | Robert | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Code is as follows:
<body> <script src="/blog/ckeditor/ckeditor.js"></script> <center> <form id="AddEntry" name="AddEntry" method="POST" action="addentrydb.asp"> <textarea name="entrytext" id="entrytext"></textarea> <script> CKEDITOR.replace("entrytext"); CKEDITOR.on('instanceReady', function() { alert('loaded'); } ); </script> <br> <input type=submit value="save" > <input type=button value="cancel" onclick="history.back"> </form> </center> <!-- //<iframe width=100% src="thisweek2.asp" target="_blank"></iframe> --> </body>
The OnInstanceReady function serves for debugging. It never fires when the <iframe> is uncommented.
Whenever the <iframe> is active, CKEditor throws an error on the following line:
return new CKEDITOR.dom.element(this.$.activeElement)
If this error is left unhandled, the form data remains empty for the editor when passed to the form handler.
This error only occurs on IE9, regardless of document mode.
Attachments (5)
Change History (22)
comment:1 Changed 12 years ago by
Keywords: | iframe javascript error removed |
---|---|
Status: | new → pending |
Version: | 4.0.1 (GitHub - master) |
comment:2 Changed 12 years ago by
After adding a config.height to config.js, this problem is resolved.
comment:3 Changed 12 years ago by
From your comment it sounds like it happens in default editor.
- Does this problem occur in default editor without any customizations?
- If so, are you able to provide sample HTML page (the above code works) that allows reproducing this problem in default editor?
Could you please answer to both of these questions?
comment:4 Changed 12 years ago by
I can no longer reproduce the problem. It may have been a version issue, as the site had an older version of FCKEditor which was still used by one page. After updating this page to use CKEditor 4, the error has disappeared.
EDIT: the error has reappeared. Like before, with the iframe present on the page, the editor does not pass a value to the form handler.
comment:6 Changed 12 years ago by
While setting up the test I've discovered the following: the problem ONLY occurs (with any variant of the code as listed originally) when run IN A FRAMESET (don't ask why this code is running in a frameset, but it is). When the page inside the frameset is running separately (i.e. individually and not as part of a frameset) the error does not occur.
comment:7 Changed 12 years ago by
So to recap the problem: CKEditor throws an error from "return new CKEDITOR.dom.element(this.$.activeElement)" when the following conditions are met:
- CKEditor is loaded in a page that is part of a frameset
- the page loading CKEditor contains an <iframe>
I've suggested to the client to drop the frameset, providing a workaround.
Changed 12 years ago by
Attachment: | iframeTest2.html added |
---|
Changed 12 years ago by
Attachment: | iframeTest.html added |
---|
comment:8 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
@Watashifr I have tried both frameset declarations and they have worked for me.
I closing this ticket as I think there is no error here.
Please provide working sample (working html page like mine) and I will reopen this issue.
comment:9 Changed 12 years ago by
I whould like to get this reopend.
The problem is still occurring with 4.0.1
- Simply make a page with a frameset, and put the editor inside the frame.
- Open it in IE9 and try to open a dialog(popup) and it wont load content.
Note: If you change page to I8 and back to 9, it works, till the browser is closed.
comment:10 Changed 12 years ago by
I have tried few times to reproduce this. If you want to have this reopened:
- Please provide reduced sample (something that can be put in samples foleder and will work). Please have a look at samples I have attached.
- Provide exact steps to reproduce this issue.
Note: If you change page to I8 and back to 9, it works, till the browser is closed.
You can't use dev-tools to reproduce issues. Only doctype or XUA tag. Standard users don't use dev-tools and second they can give different result.
comment:11 Changed 12 years ago by
I have set up a test environment at http://www.mentaljam.com/test/ (please disregard the missing images, this is for testing purposes only). Using the link "new", CK opens with an iframe on the page, rendering it inoperative. Using the "new without iframe" link opens the same page with the iframe removed, which renders things operative as expected.
Changed 12 years ago by
Attachment: | frame.html added |
---|
comment:12 Changed 12 years ago by
I have made this file, it seems that IE10 dosent work eaiter.
Lets hope this can help finding the issue
comment:14 follow-up: 15 Changed 12 years ago by
Replying to nrone:
I made a fast screencast that shows the problem.
This looks like a completely different problem.
comment:15 Changed 12 years ago by
An older issue fixed my problem, http://dev.ckeditor.com/ticket/8287
comment:16 Changed 12 years ago by
I was about to paste this here.
@nrone your problem is a duplicate of #8287 (which will be invalidated in a minute).
In your example you have made a couple of mistakes.
- You have used HTML5 doctype declaration for frameset while frames are not supported in HTML5. Here HTML4 frames set declaration is needed.
- You have forgotten to use head section in frameset page
- You have forgotten to put doctype declaration (HTML4 transitional or loose) in frame page. This resulted in mixed doctypes.
Please have a look attached zip file.
Also please note that frames are dead!!!
Changed 12 years ago by
Attachment: | HowFreamesetShouldLookLike.zip added |
---|
comment:17 Changed 12 years ago by
You're right, frames ARE dead. The project has been converted to a modern interface, the error does not occur in the new environment. Thanks for your support, let's close this case.
I have tried this sample code in different forms, in different versions of editor and it has always worked (instance ready was executed).
The editor didn't have any customizations or config settings except default ones.
@Watashifr: