gobimca2012 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
GNU General Public License v2.0
0 stars 0 forks source link

Problem with hidden textareas #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create your wysiwyg textarea in a div with style "display:none" 
2. FF throws error 0x80040111 (NS_ERROR_NOT_AVAILABLE)

Solution :
The problem occurs when editorDoc.designMode is set to on, but the target
textarea is hidden. Use css position:absolute instead of display:none to
display the textarea off-screen.

Original issue reported on code.google.com by harihara...@gmail.com on 26 Jan 2008 at 8:46

GoogleCodeExporter commented 9 years ago
I can confirm that. Eg. trying to open an editor in an hidden tab throws that 
error.
Same code but with the tab open works.

Original comment by skripten...@gmail.com on 9 Feb 2008 at 4:21

GoogleCodeExporter commented 9 years ago
In revision 3, it is fixed.

Now, when is hidden, it not set designMode and assign and event focus on the 
editor
to set it.

A sub-problem occur fixing this: the width of a hidden element is zero, so y 
get the
cols attribute and multiply per 8 to get the width.

See you,

Original comment by joksnet on 11 Feb 2008 at 5:41