Opened 17 years ago

Closed 16 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:


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,

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 17 years ago by Alfonso Martínez de Lizarrondo

Keywords: display none disabled edit not enable enabled firefox gecko removed
Resolution: duplicate
Status: newclosed

dup of #321

comment:2 Changed 17 years ago by staaky

Resolution: duplicate
Status: closedreopened

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 ( 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]) {

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Resolution: duplicate
Status: reopenedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy