Dropcursor not displayed at correct position

For me, the prosemirror-dropcursor is not displayed at the correct position sometimes. The cursor-decoration is offset vertically and does not always occur (I’m not sure when exactly but it seemed like the further down the document, the more likely it was to happen) Are there known bugs with it? May I just be using it incorrectly?

How it looks:

How it is added to the code:

const state = EditorState.create({
  ...
  plugins: [
    ...
    dropCursor(),
    ...
  ]
});

Setup I am using Ubuntu 18.04 and tried both Firefox 72.0.2 and Chromium 79.0.3945.130 with both having the behavior described.

Does the vertical offset correspond to the scroll position, in any chance? Could you reduce the HTML and CSS context needed to reproduce the issue to the minimum to see if anything specific triggers the problem?

Yes, it seems that you’re right in that it corresponds to the scroll position. The offset actually seems to be exactly the same as how far I scrolled down on the page. I could try reducing HTML and CSS down, but it might take me some time to do so.

I got the problem fixed by setting position: relative on a div wrapping the editor. Do you have to always provide such a wrapper for dropcursor to display correctly?

PS: Sorry for taking so long to reply, but at first I didnt manage to reduce the HTML/CSS and reproduce the issue and then I didn’t work on that project for some time.

No. There’s probably also something else in your layout that triggers this.