Opened 18 years ago
Closed 17 years ago
#544 closed Bug (duplicate)
Firefox: fckeditor not enabled when created in display:none element
Reported by: | staaky | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.4.2 |
Keywords: | Cc: |
Description
It's not possible to create an fckeditor in a display:none element and have it enabled in firefox/gecko.
You will have to manually enable the fckeditor when the display:none element turns visible. I do this at the moment by disabling the window.onload on the iframe(fckeditor.html), and rename it to a function I call when the display:none element turns visible. Dirty fix for now, like the other hacks and workarounds on the track, http://dev.fckeditor.net/ticket/321.
This should be fixed in fckeditor instead. With dynamic content in webpages these days a display:none tag on an element should not require you to throw in hacks and workarounds. All those people creating "AJAX/Web2.0/Dynamic" content really hit a wall with this bug.
Change History (3)
comment:1 Changed 18 years ago by
Keywords: | display none disabled edit not enable enabled firefox gecko removed |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
comment:2 Changed 18 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Your workaround in #321 works when instantly toggling display:none.
It does not work using javascript effects to show the element instead, for example a scriptaculous toggle effect (http://wiki.script.aculo.us/scriptaculous/show/Effect.Toggle) on the element that holds the fckeditor.
Using your code from 321 after the above effect has fully shown the element that holds fckeditor will result in an error once a button in fckeditor is clicked. Even though the style.display of the container is not 'none' anymore when the function is called. Manualy running the function after the the element turned visible will also give this error:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: fckeditorcode_gecko.js :: anonymous :: line 30" data: no]
I have to use something like this instead to enable fckeditor, after the element that holds the editor is fully visible:
if (frames[0]) { frames[0].FCK.EditingArea.MakeEditable(); }
comment:3 Changed 17 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
dup of #321