ueberdosis / tiptap

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

[Bug]: Unable to add mention in both bulletlist and orderedlist using the "Enter" key #5680

Open kart-c opened 18 hours ago

kart-c commented 18 hours ago

Affected Packages

@tiptap/extension-mention, @tiptap/starter-kit, @tiptap/extension-bullet-list, @tiptap/extension-ordered-list, @tiptap/extension-list-item

Version(s)

2.7.4

Bug Description

Noticed that if I am trying to tag someone in a bullet list or an ordered list, pressing "Enter" key will trigger the default bullet list action and add another list item instead of adding the mention.

Bug preview

https://github.com/user-attachments/assets/7d85bf41-4ab6-4211-aec7-0ac541a0c3c8

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

When tagging someone mention should tag the user.

Additional Context (Optional)

No response

Dependency Updates

kart-c commented 18 hours ago

I may have found a possible fix for this. It seems, bumping the priority of the mention extension to 101 does solve the issue. Not sure if this may cause any potential side effects. Let me know if I can open a PR for this.

nperez0111 commented 15 hours ago

Yep, that seems like the right solution for this. We should update the priority of the extension. In v3, we should consider a priority for keybinds specifically

kart-c commented 5 hours ago

I will test a few things around the mention priority and raise the PR sometime later.

Do you think the StarterKit should be included in the mention demo? That way the default extensions test cases can be included in the same. Or maybe a separate StarterKit demo with test cases which can be imported be imported wherever StarterKit will be imported.

nperez0111 commented 5 hours ago

I will test a few things around the mention priority and raise the PR sometime later.

👍

Do you think the StarterKit should be included in the mention demo? That way the default extensions test cases can be included in the same.

Or maybe a separate StarterKit demo with test cases which can be imported be imported wherever StarterKit will be imported.

The demo for mentions can definitely include the starter kit. It is done like that to have the most minimal demo but I think we are slowly moving away from that since it is not realistic.