wysihtml5 icon indicating copy to clipboard operation
wysihtml5 copied to clipboard

Editor becomes unresponsive after toggling containing div

Open cmatskas opened this issue 10 years ago • 4 comments

Hi, we use the rich text editor in a wizard where each step is a div whose visibility is toggled depending on the wizard progress. When first toggling the div that contains the editor, we can see and interact with the textbox just fine. However, if the user chooses to go back or forward and then decide to return to the step/div that contains the editor, then the following happens: The content disappears from from editor text box The editor cannot be clicked/edited and it's frozen

At first, I thought that this was due to the fact that we were initializing the editor every time the user accessed the step/div in question, so we now only instantiate the editor once at document.ready(). However this has not fixed the problem.

My suspicion is that the problem is related to the iframe but I'm not sure what to test for. Could you please help with this as it is stopping us from releasing our website? Thanks

cmatskas avatar Jul 17 '14 15:07 cmatskas

You will not get any further for a long time. This repo is not maintained anymore. I would recheck the dependencies of your website. As alternative I'd suggest a still maintained fork of this editor. eg http://edicy.github.io/wysihtml5/

Waxolunist avatar Jul 17 '14 20:07 Waxolunist

Hi @Waxolunist, thanks soooo much for the quick response! How different is the forked version? I'm happy to use it as long as there no major differences. What do you mean by "check the dependencies"? The only thing we do as the user progresses through the wizard is to show and hide divs in the page for each step. The first time we load the step/div with the editor, all is fine. But if the user goes back or forward and then returns to the step with the editor, even though the editor is there, the content is missing and the editor is unresponsive.

Any pointers? Thanks again for your time and effort

cmatskas avatar Jul 17 '14 20:07 cmatskas

The fork should be api compatible. There are no major differences, except more features. I had in my bootstrap wrapper no major problems when switching.

I mean with "check your dependencies", that you want to go live with a website which depends on widgets, which haven't been updated for more than two years.

For your specific problem I don't have any pointers, because I have no experience with your usecase. I'd suggest to reinitialize the editor every time you come back to the page.

Waxolunist avatar Jul 18 '14 08:07 Waxolunist

@Waxolunist again, thanks for your response. You are right about the dependencies, but I thought that the plugin was actively maintained. I will switch to the forked one but since we only do basic stuff I suspect it will all be fine. I've tried re-initializing every time the div becomes visible but it doesn't seem to work... back to the drawing board :(

cmatskas avatar Jul 18 '14 08:07 cmatskas