-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Suggestion Utility] Tippy.js: Potential memory leak with the mentions extension #2547
Open
2 tasks done
Labels
Type: Bug
The issue or pullrequest is related to a bug
Comments
rfgamaral
changed the title
Tippy.js: Potential memory leak with the mentions extension
[Suggestion Utility] Tippy.js: Potential memory leak with the mentions extension
Mar 1, 2022
Open
2 tasks
2 tasks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days |
github-actions
bot
added
the
Info: Stale
The issue or pullrequest has not been updated in a while and might be stale
label
Jun 18, 2023
bdbch
removed
the
Info: Stale
The issue or pullrequest has not been updated in a while and might be stale
label
Jun 18, 2023
Applied no-fix to this as we will phase out Tippy in the future and replace it with FloatingUI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What’s the bug you are facing?
When an editor with the Mentions extension is unmounted while having the mention suggestion popup active and selected, this message appears in the console log:
This may not seem like a big problem, and it's not with a normal setup of the Tiptap editor, but we are doing something different where this becomes a real issue: the whole app crashes.
How can we reproduce the bug on our side?
Basic CodeSandbox (https://codesandbox.io/s/tiptap-issue-2547-basic-dnlg89)
Reproduction steps:
@
into the editorCtrl+A
(or macOS equivalent)UNMOUNT
buttonAdvanced CodeSandbox (https://codesandbox.io/s/tiptap-issue-2547-advanced-zi6t1y)
This advanced example mimics the behavior of our app. We have a small editor on the bottom of the page with an expand button. Clicking this button will open an expanded/bigger version of the same editor in a modal (taking most of the screen). The expanded editor in the modal has a collapse button to close the modal, and get back to the smaller editor. But that's not all, we also want to keep the selection state between the toggled states, so if you select a word/sentence/everything in the editor, and switch to an expanded/collapsed state, the selection should be restored (this is working, try it).
Toggling the expanded/collapsed state in this editor is similar to the basic sandbox in the sense that one of the editors is unmounted, and with the "restore selection" functionality we have, the application crashes if a mention suggestion Tippy.js popup is active.
Reproduction steps:
@
into the editorCtrl+A
(or macOS equivalent)EXPAND
buttonWhat did you expect to happen?
There should be no "memory leak" nor application crashes when an editor component is unmounted with a selection active surrounding the trigger character for the mentions extension.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: