tiptap: [Bug]: Can't move cursor to left-side of mention when mention is the first thing in the editor

Affected Packages

mention

Version(s)

2.7.4

Bug Description

Using the official mentions example, delete all editor contents and insert a mention with @. Then try to use the LeftArrow key to place the cursor before the mention. You’ll realize that this is not possible. However, if you type some text, then the mention, you can use LeftArrow to move the cursor freely.

Browser Used

Firefox

Code Example URL

No response

Expected Behavior

Arrow keys should work all the times, allowing a user to place the cursor before/after any node/mark, such as mentions.

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I’ve updated all my dependencies.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

I’m on Windows, so maybe a Windows+Firefox thing. Doubt it’s an extension because I disabled them all, and still got the issue.

@rfgamaral I can’t think of anything in particular. Our NodeView class does quite a bit, but does not do anything with selection movements. I’ll reopen this but I probably won’t look into it further than this

@tiptap/pm declares prosemirror-view as a peer dep, allowing a range of versions to match: image Right now it is defined here: https://github.com/ueberdosis/tiptap/blob/develop/packages/pm/package.json#L146C6-L146C35

You can update your package-lock to a newer version of prosemirror-view and it should update to a newer version. If you re-generate your package-lock completely without any installed node_modules, then NPM would fetch the latest matching version.

So this allows us to not have to constantly bump versions and gives you the flexibility to pull in newer versions of prosemirror without having to wait on us