Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow movement in RTL text with marks creates stuck caret #948

Open
johanneswilm opened this issue Jul 5, 2019 · 2 comments

Comments

@johanneswilm
Copy link
Contributor

commented Jul 5, 2019

Issue details

When using marks with text in RTL and using arrow keys to move right/left, the caret is getting stuck some places. It doesn't matter if the dir=rtl is set on the paragraph. The issue happens whenever there are words in RTL characters that have different marks. The same markup in raw contenteditable does not show the same issues.

Steps to reproduce

  1. Go to https://glitch.com/~wistful-yacht

  2. Click into the line of RTL text.

  3. Move the caret left and right with the arrow keys.

ProseMirror version

prosemirror-view 1.9.11

Affected platforms

  • Chrome 75
  • Firefox 67

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Jul 29, 2019

Only use cursor wrappers for invisible cursors
Now that DOM reads are almost entirely synchronous, the motivation for
the cursor wrapper hack isn't very compelling anymore. Since the hack
is extremely invasive, and the cause of a number of issues, it's
desirable to remove it.

Issue ProseMirror/prosemirror#948
@marijnh

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

This was another issue caused by the cursor wrapper kludge. I have a patch in this branch that removes this kludge (its motivation is dubious since version 1.9.0 of prosemirror-view). I'd like to test this a bit more before I release it though, since it is somewhat invasive.

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Jul 29, 2019

Only use cursor wrappers for invisible cursors
Now that DOM reads are almost entirely synchronous, the motivation for
the cursor wrapper hack isn't very compelling anymore. Since the hack
is extremely invasive, and the cause of a number of issues, it's
desirable to remove it.

Issue ProseMirror/prosemirror#948
@marijnh

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

I've released the patch as prosemirror-view@19.14-prerelease for easier testing.

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Aug 6, 2019

Only use cursor wrappers for invisible cursors
Now that DOM reads are almost entirely synchronous, the motivation for
the cursor wrapper hack isn't very compelling anymore. Since the hack
is extremely invasive, and the cause of a number of issues, it's
desirable to remove it.

Issue ProseMirror/prosemirror#948

marijnh added a commit to ProseMirror/prosemirror-view that referenced this issue Aug 9, 2019

Only use cursor wrappers for invisible cursors
Now that DOM reads are almost entirely synchronous, the motivation for
the cursor wrapper hack isn't very compelling anymore. Since the hack
is extremely invasive, and the cause of a number of issues, it's
desirable to remove it.

Issue ProseMirror/prosemirror#948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.