Opened 14 years ago

Closed 14 years ago

#333 closed defect (invalid)

display:none breaks Xinha in Firefox

Reported by: Alex Owned by: gogo
Priority: high Milestone:
Component: Xinha Core Version: trunk
Severity: major Keywords: Firefox display none
Cc:

Description

Hello,

If the Xinha editor is enclosed within a div, hiding and then displaying the div will break the editor - for example when using display: none and display:block to implement tabs.

The easy solution is not to use tabs, or not to set the display to none, but sometimes that's not an option.

To reproduce:

1 - write a page with a Xinha editor enclosed within a DIV called showhide

2 - add some links underneath the editor:

<a href="javascript:document.getElementById('showhide').style.display='none';">Hide</a>

<a href="javascript:document.getElementById('showhide').style.display='block';">Show</a>

3 - load up the page in Firefox, and press the Hide link, followed by the Show link.

In IE this'll work fine, but Firefox has trouble with it. An error is thrown by Firefox: NS_ERROR_NOT_INITIALISED.

I've made some screenshots of the error, except I can't attach them here it seems.

I think this is probably a problem with Firefox, and not Xinha, and I think the best workaround would be a re-initialise function that could be called when the div's display is set to block again.

If more information is needed, don't hesitate to contact me at alexATmetacubecms.com

Thanks,
Alex

Attachments (3)

before.png (8.9 KB) - added by Alex 14 years ago.
screenshot before display change
after.png (8.5 KB) - added by Alex 14 years ago.
screenshot after display change
error.png (15.6 KB) - added by Alex 14 years ago.
The error Firefox throws

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by Alex

screenshot before display change

Changed 14 years ago by Alex

screenshot after display change

Changed 14 years ago by Alex

The error Firefox throws

comment:1 Changed 14 years ago by Alex

Found out I can attach images after all. Attached them! :)

comment:2 Changed 14 years ago by gogo

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

See bugzilla report on this. You must deactivate the editor before hiding and reactivate after showing.

https://bugzilla.mozilla.org/show_bug.cgi?id=277787

Note: See TracTickets for help on using tickets.