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

EditContext: Removing the text area dom node on disposal #234419

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export class NativeEditContext extends AbstractEditContext {
// Force blue the dom node so can write in pane with no native edit context after disposal
this.domNode.domNode.blur();
this.domNode.domNode.remove();
this.textArea.domNode.remove();
super.dispose();
Comment on lines 168 to 171
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I prefer this approach so we don't need to override:

this._register(toDisposable(() => {
	// Force blue the dom node so can write in pane with no native edit context after disposal
	this.domNode.domNode.blur();
	this.domNode.domNode.remove();
	this.textArea.domNode.remove();
}));

Copy link
Contributor Author

@aiday-mar aiday-mar Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yep thanks for the advice, indeed it removes the override

}

Expand Down
Loading