Ticket #544 (closed Bug: duplicate)

Opened 8 years ago

Last modified 8 years ago

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, 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

comment:1 Changed 8 years ago by alfonsoml

  • Keywords display none disabled edit not enable enabled firefox gecko removed
  • Status changed from new to closed
  • Resolution set to duplicate

dup of #321

comment:2 Changed 8 years ago by staaky

  • Status changed from closed to reopened
  • Resolution duplicate deleted

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

comment:3 Changed 8 years ago by alfonsoml

  • Status changed from reopened to closed
  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy