Hi,
while updating to FCKEd 2.5.1, I've noticed a problem that did not seem to exist in the past.
I use two editors on one page, the first one is always displayed, the other one is hidden in a div with display:none set (it's 'activated' - its display is set to block - on basis of some further user's actions).
The problem is that when this (hidden) editor is supposed to be loaded, it throws an error (800a025e). This behavior has been registered in IE7 but I have a suspicion that something weird is happening in Gecko, too (it does not report any error but the 'loading' cursor seems to appear on the screen way too long). It's really strange because with an exception of this error alert, everything seems to be functioning the way it should. In addition - I used the same code with a previous version - 2.2 - and none of these ever happened.
If I let the editor load without setting display:none and hide the editor only after it is loaded, no problem occurs whatsoever. StartupFocus is set to false, I don't know if any other setting parameters could affect this behavior.
2.5 has is a great step forward (I no longer have to post process various non-xhtml features) but this behavior surprised me a little and I'm unable to do anything about it.
Does anybody know what I might be doing wrong? (I use the bundled php classes to call the editor although I'm almost positive that it is not the problem).
Thanks a lot for assistence.
Malis
while updating to FCKEd 2.5.1, I've noticed a problem that did not seem to exist in the past.
I use two editors on one page, the first one is always displayed, the other one is hidden in a div with display:none set (it's 'activated' - its display is set to block - on basis of some further user's actions).
The problem is that when this (hidden) editor is supposed to be loaded, it throws an error (800a025e). This behavior has been registered in IE7 but I have a suspicion that something weird is happening in Gecko, too (it does not report any error but the 'loading' cursor seems to appear on the screen way too long). It's really strange because with an exception of this error alert, everything seems to be functioning the way it should. In addition - I used the same code with a previous version - 2.2 - and none of these ever happened.
If I let the editor load without setting display:none and hide the editor only after it is loaded, no problem occurs whatsoever. StartupFocus is set to false, I don't know if any other setting parameters could affect this behavior.
2.5 has is a great step forward (I no longer have to post process various non-xhtml features) but this behavior surprised me a little and I'm unable to do anything about it.
Does anybody know what I might be doing wrong? (I use the bundled php classes to call the editor although I'm almost positive that it is not the problem).
Thanks a lot for assistence.
Malis
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
Having the same issue... did you just create an empty FCKeditor_OnComplete function ?
Re: JS error if editor loaded within a div with display:none
Here we go:
System: XP Home Edition (Czech), MSIE7
I tried to copy it over the samples included in the public distribution, trim it as much as possible and it turned out that it probably really wasn't my mistake - the bug still exists. Here are the two lines that generate the two editors (as copied from the php output; after deleting all the config stuff - it did not solve the problem either)
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
I fixed it in the original post so as not to confuse anyone.
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
I had to change my "display:none" to "visibility:hidden" (which doesn't get the error), then in code set it back to "display:none" once the page has loaded.
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
FCKEditor 2.6 internals/fck.js line 898
range.select(); <----- error happens here
So IE is throwing an exception because the _FCK_PaddingNodeListener is trying to select a range while hidden. There probably needs to be some code in this listener to return if the editor is not visible.
This listener is not run if FCKConfig.EnterMode = 'br'; is set. ( if you can live with that )
As a quick hack (and fix for me), I put a try/catch around the select() to ignore this specific error:
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
Just updated FCKeditor to 2.6 and still see issues when editor is in hidden div.
Re: JS error if editor loaded within a div with display:none
Just applied patch you have posted and it works very well Thank you very much
Re: JS error if editor loaded within a div with display:none
the right field need a default value.
也就是,
fckeditor对应的字段不能为空值,设一个默认的值,就可以回避该错误!
Re: JS error if editor loaded within a div with display:none
Re: JS error if editor loaded within a div with display:none
z
Re: JS error if editor loaded within a div with display:none
In fact the "nodisplay" class is a class with a display:none
.media { display:none;}
Re: JS error if editor loaded within a div with display:none
I experienced this very same error with CKEditor3.0.
My editor is placed in an animated div that opens and closes. My solution was to call CKEDITOR.replace(a,...) AFTER the animation completes and the div display attribute has been set to 'block'.
Re: JS error if editor loaded within a div with display:none
To where and how it should be placed, Can you Tell me that Please ?
Re: JS error if editor loaded within a div with display:none
"Hai malis, thank you for your assistance. and shall i know where and How to include your FCKeditor_OnComplete( ), Please help me ti fix this issue. can you tell me clearly about this, Please?"