Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for handleDomNodeRemoved not being called when parent containers removed from DOM #354

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Phoebe-G
Copy link

WYSIHTML editors created on textareas inside jconfirm dialog boxes were not being properly destroyed when the dialog is closed.

The scenario can be recreated quite easily in the simple example (http://voog.github.io/wysihtml/examples/simple.html) by deleting the form element rather than its child elements.

Browser stacktrace after destroying the dialog/container was:

wysihtml.js:10009 Uncaught TypeError: Cannot read property 'document' of null
getDocument @ wysihtml.js:10009
wysihtml.Editor.wysihtml.lang.Dispatcher.extend.parse @ wysihtml.js:16047
wysihtml.views.Textarea.wysihtml.views.View.extend.setValue @ wysihtml.js:15793
wysihtml.views.Synchronizer.Base.extend.fromComposerToTextarea @ wysihtml.js:15638
(anonymous function) @ wysihtml.js:15678

…detect more instances where the editor or its target

element are removed from the DOM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant