-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug] Problem with editor.destroy() in 2.19 #1380
Comments
On editor destroy, we loop through moduleInstances and call destroy of each module. Line 85 in 43032eb
moduleInstances contain both BlockSettings and Toolbar So when looping through the moduleInstances, we call BlockSettings destroy. Now as the loops continues, it reaches Toolbar and calls the destroy of it which agains attempts to destroy BlockSettings. This causes the editor to crash as BlockSettings was already destroyed. (Same with Toolbox)
Is it ok to destroy an Editor level module from within another module? If yes, then should BlockSettings and Toolbox be contained within Toolbar and accessed only via Editor.Toolbar.BlockSettings? |
Do you plan to create a release with this bugfix? |
yes |
waiting for the release @neSpecc |
Steps to reproduce:
editor.destroy()
from the consoleTypeError: null is not an object (evaluating 'this.flipper.deactivate')
Expected behavior:
The editor destroys correctly.
Device, Browser, OS:
Safari
Editor.js version:
2.19
The text was updated successfully, but these errors were encountered: