feat: package updates (#2300)

* package updates
* update tiptap
* fix editor crash
* fix
* update list
* fix(theme): size badges to their content
* fix mantine avatar color regression
This commit is contained in:
Philip Okugbe
2026-06-20 18:11:14 +01:00
committed by GitHub
parent d7fdcdec80
commit 4f202e4ab5
26 changed files with 993 additions and 1199 deletions
@@ -112,22 +112,24 @@ const CommentEditor = forwardRef(
// websocket on another browser). Skip for editable editors to avoid
// resetting the cursor position on every keystroke.
useEffect(() => {
if (!editable && commentEditor && defaultContent) {
if (!editable && commentEditor && !commentEditor.isDestroyed && defaultContent) {
commentEditor.commands.setContent(defaultContent);
}
}, [defaultContent, editable, commentEditor]);
useEffect(() => {
setTimeout(() => {
if (autofocus) {
commentEditor?.commands.focus("end");
if (autofocus && commentEditor && !commentEditor.isDestroyed) {
commentEditor.commands.focus("end");
}
}, 10);
}, [commentEditor, autofocus]);
useImperativeHandle(ref, () => ({
clearContent: () => {
commentEditor.commands.clearContent();
if (commentEditor && !commentEditor.isDestroyed) {
commentEditor.commands.clearContent();
}
},
}));