ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
27.5k stars 2.28k forks source link

Enter or ArrowRight key doesn't work in @tiptap-pro/extension-details with @tiptap-pro/extension-unique-id #3108

Open yuyuyukie opened 2 years ago

yuyuyukie commented 2 years ago

What’s the bug you are facing?

Normally, when you press Enter key or ArrowRight key at the bottom of the detailsContent, the cursor gets out of details node and moves under it. But when you use UniqueID extension with types: ['paragraph'] configured, it's no longer working.

I recorded the video. In the later part of this video, I pressed ArrowUp key in order to create new paragraph over the details. https://user-images.githubusercontent.com/64625150/185859916-d00a2e6a-c7b5-4a5b-a849-1bda08da0adc.mp4

Which browser was this experienced in? Are any special extensions installed?

Any browsers I guess, but I have confirmed in latest Edge, Chrome. UniqueID extension with types: ['paragraph']

How can we reproduce the bug on our side?

In React,

  const editor = useEditor({
    extensions: [
      Document,
      Paragraph,
      Text,
      UniqueID.configure({ types: ['paragraph'] }),
      Details.configure({
        HTMLAttributes: {
          class: 'details',
        },
      }),
      DetailsSummary,
      DetailsContent,
    ],
  })

Can you provide a CodeSandbox?

No response

What did you expect to happen?

The cursor can get out of details node when I press Enter or ArrowRight keys.

Anything to add? (optional)

No response

Did you update your dependencies?

Are you sponsoring us?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

corbinschwartz commented 1 year ago

Can we remove the stale label on this? This bug is biting me currently.