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

Wrong cursor position in RTL (right-to-left) mode #47

Open
JoVictorNunes opened this issue Jun 20, 2022 · 1 comment
Open

Wrong cursor position in RTL (right-to-left) mode #47

JoVictorNunes opened this issue Jun 20, 2022 · 1 comment

Comments

@JoVictorNunes
Copy link

In RTL mode, the cursor appears on a wrong position. See below:

2022-06-20_10-31-38.mp4
@JoVictorNunes JoVictorNunes changed the title Wrong cursor position in RTL (right-to-let) mode Wrong cursor position in RTL (right-to-left) mode Jun 20, 2022
@tamo
Copy link

tamo commented Sep 27, 2022

There are (at least) two problems.

  1. ace_outer is not rtl even if the url has "?rtl=true"
  • ep_cursortrace creates a hidden span to calculate the location of the cursor
  • the span is copied from ace_inner, which has "dir=rtl", to ace_outer, which doesn't
  • so we have to add "dir=rtl" to somewhere in ace_outer
    • if we add "dir=rtl" to ace_outer, we probably have to modify css too
  1. ep_cursortrace uses too many "left"
  • it assumes that the cursor position is defined by "top" and "left"
  • so we have to switch the code from top-left to top-right according to the direction

Both are quite a lot of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants