tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

[Bug]: Cannot click after tables with gapcursor

Open Encoded2 opened this issue 1 year ago • 3 comments

Which packages did you experience the bug in?

react, table, gapcursor

What Tiptap version are you using?

2.2.0

What’s the bug you are facing?

When a table is the last element in the editor, you are unable to click after it in order to type below it. You can however use the arrow keys. This bug is easily reproducible on the table example. https://tiptap.dev/docs/editor/api/nodes/table

What browser are you using?

Chrome

Code example

https://tiptap.dev/docs/editor/api/nodes/table

What did you expect to happen?

Gapcursor should allow a user to click after a table to add content

Anything to add? (optional)

No response

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

Encoded2 avatar Feb 06 '24 19:02 Encoded2

it's not a bug, because the demo's code is quite simply, add a min-height of editor could fix this behaviour

ethanyou725 avatar Feb 08 '24 07:02 ethanyou725

I found that adjusting the table margins helped in Chrome. The Prosemirror table example is a good working example of the spacing (https://prosemirror-tables.netlify.app/)

However, I haven't been able to get it working in Firefox. The Prosemirror example is also a Firefox fail.

laurenga avatar Apr 23 '24 17:04 laurenga

it's not a bug, because the demo's code is quite simply, add a min-height of editor could fix this behaviour

If the document is larger than the min-height when the table is added, that won't work.

philiprenich avatar Apr 24 '24 00:04 philiprenich

See https://github.com/ProseMirror/prosemirror/issues/1466. This may be an issue with how prosemirror is determining positioning near nested blocks.

The patch for issue 1466 was included in https://github.com/ProseMirror/prosemirror-view/releases/tag/1.33.7

laurenga avatar May 30 '24 16:05 laurenga