froala / angular-froala

Angular.js bindings for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
MIT License
306 stars 123 forks source link

Cannot go to other state <$state.go(newState)> #190

Closed trungntq closed 5 years ago

trungntq commented 5 years ago

On state which contain wysiwyg-editor, I have a button which lead my app to other page (state). $state.go(Constants.states.searchPage);

But I meet this error:

DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. at HTMLDivElement. (http://localhost:8000/bower_components/jquery/jquery.js:5523:12) at init.domManip (http://localhost:8000/bower_components/jquery/jquery.js:5588:15) at init.replaceWith (http://localhost:8000/bower_components/jquery/jquery.js:5517:8) at Object.destroy (http://localhost:8000/bower_components/froala-wysiwyg-editor/js/froala_editor.min.js:7:80782) at s.destroy (http://localhost:8000/bower_components/froala-wysiwyg-editor/js/froala_editor.min.js:7:5405) at HTMLTextAreaElement. (http://localhost:8000/bower_components/froala-wysiwyg-editor/js/froala_editor.min.js:7:5880) at Function.each (http://localhost:8000/bower_components/jquery/jquery.js:590:23) at init.each (http://localhost:8000/bower_components/jquery/jquery.js:237:17) at init.M.fn.froalaEditor (http://localhost:8000/bower_components/froala-wysiwyg-editor/js/froala_editor.min.js:7:5606) at Scope.$scope.goToSearch (http://localhost:8000/app/controllers/client/client.create.controller.js:32:29)

Can anyone give me some advice on this, please. Many thanks

nilupull commented 5 years ago

I also have the same issue in my AngularJS application. Any solution so far?

stefanneculai commented 5 years ago

Please make sure that you destroy the editor instance before going to another page.