JS error if editor loaded within a div with display:none
21 posts
• Page 1 of 3 • 1, 2, 3
JS error if editor loaded within a div with display:noneHi,
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:noneI've solved it for myself by using FCKeditor_OnComplete function. Therefore let this remain just a piece of information for others/authors that this may occur. I don't think that it is the intended behavior of the editor anyway, so it may inspire you (authors) to have a look at it. Fortunately, it's no longer a problem for me.
|
Re: JS error if editor loaded within a div with display:noneCould you please file a bug with your original page so we can reproduce the problem and understand if it's something that must be fixed?
1. Read the documentation
2. Check the nightly build 3. If the problem isn't reported, file a ticket about it
|
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:noneHere 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)
That's interesting that if input "ArticleText1" does not have the value empty, the error does not occur (I hide the latter editor right in case its value is empty - in practice it works as follows: the first editor can be either the entire article or just a kind of an annotation and in such a case the other editor is used for the rest of the article). Let me add a solution for those who might find it useful right now: <div style="display:none"> is, in practice, actually: <div class="HideFCKEditor" id="HiddenFCKArticleText1">
Of course even this is a little simplified but I hope you can see the way the workaround works. JFYI: The complete page (the rest of the stuff comes from the original sample):
Last edited by malis on Mon Feb 25, 2008 8:20 pm, edited 1 time in total.
|
Re: JS error if editor loaded within a div with display:none
You were faster them me typing the previous reply. Anyway, the solution is inlcuded there. It seems to be working just fine although it may not be absolutely "elegant"
|
Re: JS error if editor loaded within a div with display:noneOf course, I'm talking s**t - the div actually looks like this <div class="HideFCKEditor" id="HiddenFCKArticleText1">
I fixed it in the original post so as not to confuse anyone.
|
Re: JS error if editor loaded within a div with display:noneI've tested that page with the current code (today the 2.6beta was released) and it seems to work fine in IE7
1. Read the documentation
2. Check the nightly build 3. If the problem isn't reported, file a ticket about it
|
Re: JS error if editor loaded within a div with display:noneI added the FCKeditor_OnComplete() into my page, but in IE6 I still get the error, presumably because it hasn't reached that stage to call the oncomplete function yet. Did you try IE6 too?
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:noneDoes anyone have a solution for this error?? In what file should i put the function FCKeditor_OnComplete function????
|
21 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests