Opened 14 years ago

Closed 14 years ago

Last modified 8 years ago

#858 closed defect (wontfix)

If an Xinha editor does in hidden element whet it generates, it freezes

Reported by: guest Owned by: gogo
Priority: highest Milestone:
Component: Xinha Core Version:
Severity: major Keywords: xinha editors freeze hidden element


I have some textarea(s) inside my form, some of them are hidden (inside a div with style display:none). after xinha generate editors, when i change div(s) display to show the elements, the Xinha editors inside them look freeze.

but after using deactivateEditor() activateEditor(), toolbar works but content area of editor still freezes.

in IE and Firefox

Change History (3)

comment:1 Changed 14 years ago by bsimkinsATintsoftDOTch

I have encountered similar problems (edition interface with tab for multilingual edition).

Here is a work around I have found, which you need to include in the js which changes the tab display:


I'm not sure whether this is 'clean' or not, but it seems to work for me...
(As an aside: in the same context, the layout of Xinha goes completely wrong when switching from/to html-mode).

comment:2 Changed 14 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed

Not a bug in Xinha, it's to work around browser problems. You must follow some rules...

  1. Deactivate editors before hiding them, or showing them (or any parent element).
  2. Editors must be visible when you create them, you should not create an editor when hidden.

comment:3 Changed 8 years ago by ejucovy

I just ran into this problem too. This article has a useful description of a workaround that you can use if you have to create an editor when hidden:

In short, it says that you need to:

  1. Specify a width and height in pixels in your xinha_config before initializing Xinha
  2. Call xinha_editor.sizeEditor() when the editor is made visible for the first time

This technique seems to be working for me, and allows me to set up Xinha editors within javascript tabs, collapsed divs, etc.

Note: See TracTickets for help on using tickets.