dhtmlXeditor: not working when hidden initially

I’m trying to use dhtmlXeditor in a way similar to dhtmlXCalendar:



Initially, the editor is hidden.

Whenever a user clicks a button, it is shown and ready to be used.

I’ve tried various ways but could not get it to work.

Extracts from my source:





















Firebug throws the following error when I left-click in the editor:





[Exception… “Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]” nsresult: “0x80070057 (NS_ERROR_ILLEGAL_VALUE)” location: "JS frame :: …:8081/ReconcileFiveR4/assets/ … xeditor.js

Line 26





I’m using dhtmlxeditor.js v.2.0 build 81107

Thanks in advance.


We have tested this mode with the latest editor version - teh sample is attached.


Please, provide the sample that demonstrates the issue.


1241100366.zip (39.4 KB)

I tested your sample with the following results:

Using IEv6, it works fine.
With FF 3.0.10 however, it is only working when the “hide” link is not being clicked.
After clicking “show”, it is no more possible to edit text in the editor “window”.

However, my bigger concern is that when I uncomment the call for function “hide()” and than run your sample code,
the editor is neither working in IEv6 nor in FF3.



Thanks for your quick reply!
Mort.


The issue is confirmed.


As the possible workaround you can try to reinitialize editor each time you show it.


Please, see attached sample.


1241100366.zip (39.4 KB)

The workaround works…

In IEv6, all is good.
In FF 3.0.10, it looks like the browser tab is being reloaded everytime the editor is shown / initialized.

Thanks for the quick fix.