Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep the timeline still when the resting composer expands #12771

Mergedflamboh(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/12771/headmerged by maria-rcks View on GitHub

Showing 1 changed file with 25 additions and 9 deletions.

x
0 of 1 viewed, 1 left
25 additions and 9 deletionsapps/web/src/components/ComposerPromptEditorTiptap.tsxModified
View file
@@ -725,6 +725,19 @@
}, []);
​
+ const editorAttributes = useMemo(
+ () => ({
+ class: cn(
+ "composer-tiptap block max-h-50 min-h-17.5 w-full overflow-y-auto whitespace-pre-wrap wrap-break-word bg-transparent leading-relaxed text-foreground focus:outline-none",
+ className,
+ ),
+ "data-testid": "composer-editor",
+ "data-composer-rich-text": richText ? "true" : "false",
+ "aria-placeholder": placeholder,
+ }),
+ [className, placeholder, richText],
+ );
+​
const editor = useEditor(
extensions: [
@@ -787,15 +800,7 @@
editable: !disabled,
editorProps: {
- attributes: {
- class: cn(
- "composer-tiptap block max-h-50 min-h-17.5 w-full overflow-y-auto whitespace-pre-wrap wrap-break-word bg-transparent leading-relaxed text-foreground focus:outline-none",
- className,
- ),