-
-
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
Resolve editor.destroy() Problem #1404
Resolve editor.destroy() Problem #1404
Conversation
@@ -381,8 +381,6 @@ export default class Toolbar extends Module<ToolbarNodes> { | |||
* It is used in Read-Only mode | |||
*/ | |||
private destroy(): void { | |||
this.Editor.Toolbox.destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This destroy is also called when we toggle read only mode. Would that expect this destroy to take care of destroying toolbox and blockSettings? Just curious as we use this in production.
this.destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sis-dk
Ya that would be handle with toggle button. We just removing this because it called twice when we trying to destroy the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sis-dk @robonetphy thanks. I've moved the Toolbox and BlockSettinga destroy methods to the toggleReadOnly
, because it is the logical opposite to this.drawUI()
.
- On the read-only mode toggling all the modules destroys correctly, no memory leak here.
- On
editor.destroy()
all modules` destroy fired once.
* Resolve editor.destroy() Problem * Resolve this.flipper undefined in inline.ts in readonly mode * fix destroy methods * destroy conversion toolbar on toggling read-only Co-authored-by: Peter Savchenko <[email protected]>
Resolve #1380
@neSpecc let me know Changes I have to make in CHANGELOG.md (Create new version or new patch) ?
and Also,
yarn lint
giving me as the following warning,How to solve that?