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

Resolve editor.destroy() Problem #1404

Merged
merged 4 commits into from
Nov 6, 2020
Merged

Resolve editor.destroy() Problem #1404

merged 4 commits into from
Nov 6, 2020

Conversation

robonetphy
Copy link
Member

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,
Screenshot 2020-10-29 005601
How to solve that?

@@ -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();
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member

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().

  1. On the read-only mode toggling all the modules destroys correctly, no memory leak here.
  2. On editor.destroy() all modules` destroy fired once.

@neSpecc neSpecc merged commit e477621 into codex-team:next Nov 6, 2020
neSpecc added a commit that referenced this pull request Dec 8, 2020
* 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]>
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.

[Bug] Problem with editor.destroy() in 2.19
4 participants