Opened 16 years ago
Closed 16 years ago
#2923 closed Bug (fixed)
"CKEDITOR is not defined" on page reload when editor focused.
Reported by: | Garry Yao | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Firefox Review+ | Cc: |
Description (last modified by )
This bug is found to be due to reload the page with focus on wysiwyg mode, cause a javascript error as titled in FF.
Attachments (4)
Change History (15)
comment:1 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Keywords: | Firefox added |
Changed 16 years ago by
Attachment: | 2923.patch added |
---|
comment:2 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:3 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
Changed 16 years ago by
Attachment: | 2923_2.patch added |
---|
comment:4 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:5 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | set to Frederico Caldeira Knabben |
Status: | new → assigned |
The first patch was much better than this new one. You should have only changed "document" to "window", as I've described. I can't understand the changes on "editor_basic.js" also.
I'll be attaching a new patch for it, as this one is quite an annoying bug.
Changed 16 years ago by
Attachment: | 2923_3.patch added |
---|
comment:6 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:7 Changed 16 years ago by
It's actually a very edge bug for FF, the native event which caused the error is found to be keyup, which only happened when reloading page with key shortcut like F5 and Ctrl-R, it could be identified with the following modification to the same patching position as in 2923_3.patch.
if ( typeof CKEDITOR != 'undefined' ) domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) ); else throw new Error( domEvent.type );
So at the point of this error, the whole JavaScript global context which is window doesn't present at all, we need to make the sniffer happened at JavaScript Core level instead of the host environment perhaps.
comment:8 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|
Changed 16 years ago by
Attachment: | 2923_4.patch added |
---|
comment:9 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:10 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
The correct way to check for a global variable existence is by using the "window" object, not "document". Don't know how it worked for you, but theoretically it shouldn't.
Please also add a comment including this ticket number, so we can understand why we are doing that in the future.