prosemirror-math icon indicating copy to clipboard operation
prosemirror-math copied to clipboard

Problem with caret position of math_inline in RTL

Open abisar opened this issue 3 years ago • 1 comments

When the editor direction is rtl, caret position acts wrong in inline mode and makes it unusable. Pressing left arrow key (or right) doesn't work correctly and gets stuck in a loop. It's easy to reproduce: tuy5y5y5y

I tried to change updateCursorPos internally but didn't get anywhere. How can I change the cursorSide in tiptap2? I'm using the example from here.

abisar avatar Jul 12 '22 15:07 abisar

Thank you for reporting! I believe there are a few factors at play here where LTR is hard-coded as an assumption. I may be able to fix this by having an RTL config flag, and reversing the relationship between document position and direction whenever the flag is set. I will see if a simple fix is possible.

benrbray avatar Jul 16 '22 12:07 benrbray