-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix - set selection on update for tiptap #979
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 257 Passed, 36 Skipped, 47.49s Total Time |
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.
i'm abit hesistant on this because it seems like we're adding alot of overhead that we must remember as useEffect
is not very tightly coupled to the call site - should we try to find another solution?
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
editor?.commands.setContent(data) | ||
editor.commands.setContent(data, false) |
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.
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.
resolved in cb8ab4f
…iptap-editor-selection-jumping
@seaerchin agree. perhaps i can add a ticket for that since this issue is quite a blocker to the site users since they cannot edit certain components |
Problem
When users type in tiptap, the cursor will jump. This is caused by the
useEffect
we have which was necessary to ensure data is repopulated back when user dismisess the "are you sure you want to drop changes" modalRE: https://opengovproducts.slack.com/archives/C07CWUNUL68/p1736426201036129
Solution
Breaking Changes
Bug Fixes:
Tests