Regarding the positioning of the cursor when exiting an inline code block. #6054
-
When the cursor is placed right after the last character of an inline code block and the right arrow key is pressed, the cursor should move to the position in front of the letter "t" and behind the code block, which is more in line with common usage habits. However, due to some default browser behaviors, the cursor seems to be positioned behind the letter "t", as shown in the following image: Similarly, when the cursor is at the leftmost position of the code block, there is a similar issue: Steps to reproduce the problem: Enter a paragraph of text -> Select a portion of the text -> Set it as an inline code block -> Move the cursor. I'm wondering if a similar effect can be achieved in Tiptap? Or are there any other solutions to this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a known limitation of prosemirror. This is because of how browsers aren't good at distinguishing between the cursor being within a tag & not. Only library I've seen handle this is https://github.com/ocavue/prosemirror-virtual-cursor but I've not integrated it with tiptap to know if it works or not |
Beta Was this translation helpful? Give feedback.
This is a known limitation of prosemirror. This is because of how browsers aren't good at distinguishing between the cursor being within a tag & not. Only library I've seen handle this is https://github.com/ocavue/prosemirror-virtual-cursor but I've not integrated it with tiptap to know if it works or not