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

Added Web Component shadowDOM support #2966

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

merajcal
Copy link

Issue: Custom toolbar not able to create.
RCA: quill was using document object to find elements.
Solution: added check if quill editor is rendered inside shadowDOM or inside document

@@ -20,6 +19,7 @@ class Emitter extends EventEmitter {
constructor() {
super();
this.listeners = {};
EMITTERS.push(this);
Copy link

Choose a reason for hiding this comment

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

This is a memory leak. When Quill editors are being dynamically created and destroyed, these emitters will live forever, keeping their listeners alive and with them much of the quill instance.
Previously the emitter was only held by the quill instance and the DOM, now it's global.
So this probably needs to be an array of WeakRefs, or Quill gets a dispose method.

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.

3 participants