ProseMirror / prosemirror

The ProseMirror WYSIWYM editor

Home Page:http://prosemirror.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clicking on the padding at the top of the editor returns the wrong position which prevents it from triggering a gap cursor

hollykurt opened this issue · comments

Steps to Reproduce

Try: https://codesandbox.io/p/sandbox/tiptap-click-above-block-with-content-9lwqgg

  1. Just click above the padding at the top, it returns position 1, and no gap cursor appears.
  2. Click between the "WAT" nodes. it returns position 8, and no gap cursor appears.

You can see the resulting position for the click in the browser console.

This used to work in 1.30.0, try it again in: https://codesandbox.io/p/sandbox/tiptap-click-above-block-with-content-forked-yyf6gd

Where the only change is to pin to prosemirror-view@1.30.0, and it will work.

This seems to be a regression in posFromCaret.