Skip to content

Conversation

@hakonharnes
Copy link
Contributor

@hakonharnes hakonharnes commented Dec 3, 2025

When the cursor is in the middle of text (e.g., "hello (cursor) world") and pressing Enter to submit, the message would be sent as "hello \nworld" instead of "hello world". This happens because the React onKeyDown handler on EditorContent fires after Tiptap has already processed the Enter key and inserted a newline.

This PR moves the Enter key handling to Tiptap's handleKeyDown in editorProps, which intercepts keystrokes before the editor processes them.

@vercel
Copy link

vercel bot commented Dec 3, 2025

Someone is attempting to deploy a commit to the cgoinglove's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hakonharnes hakonharnes force-pushed the fix/enter-key-newline-insertion branch from 889cbb7 to 4f1ff3d Compare December 3, 2025 18:53
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.

1 participant