Visual cursor movement broken with RTL text with LTR text in it #4878

Closed
opened 2017-07-25 21:36:08 +02:00 by marijnh · 7 comments
marijnh commented 2017-07-25 21:36:08 +02:00 (Migrated from gitlab.com)

I'm going off of the latest release. I've reproduced this issue with the demo on the website. Steps to reproduce:

  1. On https://codemirror.net/demo/bidi.html, add a URL (English) somewhere between two chunks of Hebrew text.
  2. Make sure "Use visual order for arrow key movement" is checked.
  3. Start with the line below the one with the URL and move your cursor left. It skips the URL and moves to the end of the line when it comes to that line and unexpectedly jumps a few other spots.
  4. Try selecting text. Similar problems.

I am also explicitly setting "rtlMoveVisually: true" in my initialization config. It didn't help.
I think the ideal solution would be to add a config option to let the browser handle cursor movements. I am aware it's not consistent but at least it wouldn't be inconsistent compared to other websites.

I'm going off of the latest release. I've reproduced this issue with the demo on the website. Steps to reproduce: 1. On https://codemirror.net/demo/bidi.html, add a URL (English) somewhere between two chunks of Hebrew text. 2. Make sure "Use visual order for arrow key movement" is checked. 3. Start with the line below the one with the URL and move your cursor left. It skips the URL and moves to the end of the line when it comes to that line and unexpectedly jumps a few other spots. 4. Try selecting text. Similar problems. I am also explicitly setting "rtlMoveVisually: true" in my initialization config. It didn't help. I think the ideal solution would be to add a config option to let the browser handle cursor movements. I am aware it's not consistent but at least it wouldn't be inconsistent compared to other websites.
marijnh commented 2017-07-25 21:36:53 +02:00 (Migrated from gitlab.com)

I noticed there is a ~3 years old 'direction' branch of code. Do you think it'll work better? I can try to rebase, if so.

I noticed there is a ~3 years old 'direction' branch of code. Do you think it'll work better? I can try to rebase, if so.
marijnh commented 2017-07-29 00:27:18 +02:00 (Migrated from gitlab.com)

Thanks for your report! I can confirm that the position after moving left until the cursor jumps a line is wrong in your example. I'll have a look. The direction branch is mostly obsolete and un-rebaseable.

Thanks for your report! I can confirm that the position after moving left until the cursor jumps a line is wrong in your example. I'll have a look. The `direction` branch is mostly obsolete and un-rebaseable.
marijnh commented 2017-07-31 23:57:31 +02:00 (Migrated from gitlab.com)

That'd be great, @adrianheine. Thank you.

That'd be great, `@adrianheine.` Thank you.
marijnh commented 2017-08-18 20:42:20 +02:00 (Migrated from gitlab.com)

mentioned in issue #4921

mentioned in issue #4921
marijnh commented 2017-09-19 16:07:57 +02:00 (Migrated from gitlab.com)

This seems to only occur (or at least be much easier to reproduce) when the editor's direction is set to RTL. @adrianheine Do you still have plans to look at it?

This seems to only occur (or at least be much easier to reproduce) when the editor's direction is set to RTL. `@adrianheine` Do you still have plans to look at it?
marijnh (Migrated from gitlab.com) closed this issue 2017-09-20 21:01:35 +02:00
marijnh commented 2018-07-13 00:08:44 +02:00 (Migrated from gitlab.com)

I think this issue is back.

I think this issue is back.
marijnh commented 2018-07-13 00:14:17 +02:00 (Migrated from gitlab.com)

mentioned in issue #764

mentioned in issue #764
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5#4878
No description provided.