Skip to content

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

Open
Phoebe-G wants to merge 2 commits intoVoog:masterfrom
Phoebe-G:master
Open

Fix for handleDomNodeRemoved not being called when parent containers removed from DOM#354
Phoebe-G wants to merge 2 commits intoVoog:masterfrom
Phoebe-G:master

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