Bug reportNov 11, 2026· 0:26· 13 views
Tiptap editor: pressing Enter over a selection starting at the beginning of a block does nothing
0:26 total
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
mediumEnter key handling for a non-empty selection, likely the splitBlock or deleteSelection command chain. The handler seems to bail out when the selection starts at offset 0 of the first block (an h2 heading). Also worth checking: Home then Shift+End selected the whole document at 9.0s, not just the heading line.
os: macOSdpr: 1url: /src/examples/default/reactlocale: en-USbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinviewport: 1280x720page_title: Examples/Default/React
Repro steps
- 1.Open /src/examples/default/react. The editor shows the H2 heading 'Hi there,' followed by a paragraph, a bullet list, a code block and a blockquote.
- 2.Click the heading 'Hi there,' (h2).
- 3.Press Home, then press Shift+End. The selection now starts at the beginning of the heading and covers the whole document.
- 4.Press Enter.
Expected
Pressing Enter over the selection deletes the selected content and splits the block. The second attempt behaves this way: after Enter at 19.9s only 'Hi' remained, an empty paragraph was created and Undo became enabled (21.0s to 23.0s).
Actual
Nothing happens. After Enter at 12.1s the document and the selection are unchanged. The heading is still 'Hi there,' and Undo stays greyed out from 13.0s to 17.0s. At 12.8s a console warning reports that Enter from block position 0 left the h2 as 'Hi there,' with content unchanged and flags this as a bug.
Evidence
visualAfter Home and Shift+End, the selection covers all document content from the heading 'Hi there,' through the blockquote. The H2 toolbar button is no longer highlighted.
consoleWarning 'tiptap#8743: Enter from block pos-0, h2 is "Hi there," (content unchanged, bug)'. The text is paraphrased to remove dash and arrow characters.
visualAfter Enter, the selected content is still present and still highlighted. The heading is 'Hi there,' and Undo is still disabled. This shows no transaction was applied.
visualThe state is still unchanged 5 seconds after Enter. The document, the selection and the disabled Undo button are the same as before the keypress.
visualControl case, second attempt: the selection starts at 'there,' and leaves 'Hi ' unselected. Its start is not position 0.
consoleControl case: warning 'tiptap#8743: Enter from pos-3, h2 is "Hi " (selection deleted, works correctly)'. The text is paraphrased to remove dash and arrow characters.
visualControl case works: only the heading 'Hi' remains, the Paragraph toolbar button is highlighted and Undo is enabled.
visualControl case works: a text caret sits in a new empty paragraph below 'Hi'.
Issue markdown (copy-paste ready)
## Summary In the Tiptap default React example, pressing Enter does nothing when the selection starts at the beginning of a block (position 0). The selected content is not deleted and the block is not split. When the selection starts later in the same heading, Enter works correctly. ## Environment - Browser: Chromium 151.0.7922.34 - OS: macOS - Viewport: 1280x720, DPR 1 - Locale/Timezone: en-US, Europe/Berlin - URL: /src/examples/default/react (title: Examples/Default/React) ## Steps to reproduce 1. Open /src/examples/default/react (0s). 2. Click the heading 'Hi there,' (h2) (6.7s). 3. Press Home, then Shift+End (7.9s, 8.4s). The selection starts at the heading start and covers the whole document (9.0s). 4. Press Enter (12.1s). ## Expected The selection is deleted and the block is split. Undo becomes available. ## Actual Nothing changes. The heading stays 'Hi there,', the selection remains, and Undo stays disabled from 13.0s to 17.0s. ## Evidence - 9.0s: the selection spans all content from 'Hi there,' through the blockquote. - 12.8s: console warning `tiptap#8743` reports that Enter from block pos-0 left the h2 as "Hi there," with content unchanged, flagged as a bug. - 13.0s and 17.0s: the document is unchanged and Undo is still greyed out. ## Control case (works) - 19.0s: the selection starts at 'there,' (pos 3) and leaves 'Hi ' unselected. - 19.9s: Enter is pressed. - 20.5s: console warning `tiptap#8743` reports Enter from pos-3, selection deleted, works correctly. - 21.0s: only 'Hi' remains, the Paragraph button is active and Undo is enabled. - 23.0s: the caret sits in a new empty paragraph below 'Hi'. ## Notes - In the first attempt, Home then Shift+End selected the entire document, not just the heading line (9.0s). In the second attempt, the same keys produced a selection starting after 'Hi ' (19.0s). The reason for this difference is not visible in the recording. - The result of Control+z at 23.4s is not shown in any keyframe. ## Suggested area The Enter keyboard shortcut handling (splitBlock or deleteSelection chain) for selections whose start is at offset 0 of the first block. *Recorded with SceneRecap.*
Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →