Skip to content

The program editor cursor is off by a few lines (Chrome on MacOS) #45

Closed

Description

@pradeeban

Just open any long program and go to the end.
Click there, and you will find the cursor is off by a couple of lines.
This is better visible when you click over the lines and highlight them.
This is confusing to the users. Is it because of the syntax highlighting module? If we can get rid of this bug by removing the syntax highlighting, that can be a better workaround.

Screenshot

Activity

  1. changed the title [-]The program editor cursor is off.[/-] [+]The program editor cursor is off by a few lines[/+] on Oct 26, 2022
  2. Aviral09 commented on Oct 31, 2022

    @Aviral09

    This is a coding logic bug which can be resolved with some debugging. No need to remove syntax highlighting for this will send a PR for the same shortly.

  3. pradeeban commented on Nov 1, 2022

    @pradeeban
    MemberAuthor

    great. Looking forward to the PR. Thanks.

  4. Aviral09 commented on Nov 2, 2022

    @Aviral09

    I could not replicate this issue on the local machine. Please check if PR #47 fixes this as well.

  5. pradeeban commented on Nov 2, 2022

    @pradeeban
    MemberAuthor

    This issue is still present. To reproduce, just open the concore editor https://controlcore-project.github.io/concore-editor/

    Then upload the concore folder from the concore repository and open the "concoredocker.py" (or any sufficiently long file actually), in Chrome.
    Then select all the text of the file, or just go to the last line. You start to see how the lines are off and you won't be able to figure out where you are actually typing.

    I have included a screenshot in the original report of this bug. You can open it to see how it looks like.

  6. pradeeban commented on Nov 2, 2022

    @pradeeban
    MemberAuthor

    Even after the last PR merge, the issue still exists.

  7. pradeeban commented on Nov 2, 2022

    @pradeeban
    MemberAuthor

    We have observed this issue on Chrome on Mac OS.
    The issue does not exist in Firefox on Mac OS.

  8. pradeeban commented on Nov 2, 2022

    @pradeeban
    MemberAuthor

    Chrome on Windows does not have the cursor misaligned the way it is on macOS. So, this can be tricky to reproduce and fix.

  9. changed the title [-]The program editor cursor is off by a few lines[/-] [+]The program editor cursor is off by a few lines (Chrome on MacOS)[/+] on Nov 2, 2022
  10. Aviral09 commented on Nov 3, 2022

    @Aviral09

    Could you please share the chrome version info and check if any fonts "Arial", "Helvetica", or sans-serif are present?
    This can be checked by going into browser settings.

    Most likely, this is a font/ configuration issue, as I checked with a friend having mac and this issue doesn't appear.
    The Chrome on macOS he tested had - Version 107.0.5304.87 (Official Build) (x86_64)

  11. pradeeban commented on Nov 3, 2022

    @pradeeban
    MemberAuthor

    Interesting. I use the same Version 107.0.5304.87 (Official Build) (x86_64). Tested in my user profile as well as the incognito/private mode.

    Unlikely to be a configuration issue since I do not really use Chrome, and it remains in the default setting. As of now, I use Chrome only for the concore editor.

    Also, Mark found this issue first. That means both Mark and I have this issue.

    Just to be clear, we are testing the latest version of https://controlcore-project.github.io/concore-editor/ (not the local deployment).

  12. Aviral09 commented on Nov 4, 2022

    @Aviral09

    Upon digging further, I found this issue.
    It clears that this is a browser issue and happens only on Chrome on macOS.

    I will spend some time looking for a workaround to fix this. Otherwise, I would change the library used for syntax highlighting.

  13. pradeeban commented on Nov 4, 2022

    @pradeeban
    MemberAuthor

    Great found. Thanks.

  14. parteekcoder commented on Feb 13, 2023

    @parteekcoder

    hey @pradeeban , can you please tell me about this bug some details , not able to properly understand it from above conversation , so that I will start work upon it

  15. pradeeban commented on Feb 13, 2023

    @pradeeban
    MemberAuthor

    Hi @parteekcoder,
    Please you open this screenshot ->> https://github.com/ControlCore-Project/concore-editor/blob/main/figures/program-editor.png

    You will see the curser lines being off by several lines, making the program editor unusable on Chrome on MacOS. This is bad because Chrome is our officially supported browser, and this bug makes the program editor unusable altogether on MacOS.

    Please let me know if that makes it clear.

    @Aviral09 may have more pointers.

  16. parteekcoder commented on Feb 13, 2023

    @parteekcoder

    Hi @parteekcoder, Please you open this screenshot ->> https://github.com/ControlCore-Project/concore-editor/blob/main/figures/program-editor.png

    You will see the curser lines being off by several lines, making the program editor unusable on Chrome on MacOS. This is bad because Chrome is our officially supported browser, and this bug makes the program editor unusable altogether on MacOS.

    Please let me know if that makes it clear.

    @Aviral09 may have more pointers.

    yeah understood , Is it only happens with large files or small too?

    @Aviral09 may have more pointers. "what do you mean by this"

  17. pradeeban commented on Feb 13, 2023

    @pradeeban
    MemberAuthor

    It happens with any file. But it will be more obvious in large files.

    Appears only in MacOS. This was implemented by @Aviral09. So, I mean, he may be able to give you more guidance if needed (when/if his time permits, that is).

  18. parteekcoder commented on Feb 13, 2023

    @parteekcoder

    OK I will look into this issue

  19. pradeeban commented on Feb 13, 2023

    @pradeeban
    MemberAuthor

    Great. Thanks.

    Please make sure you have access to a Mac OS. It appears only in Mac OS, as far as I am aware.

  20. parteekcoder commented on Mar 6, 2023

    @parteekcoder

    hey @pradeeban @Aviral09 I am not able to reproduce this issue, Are able to reproduce this issue

  21. pradeeban commented on Mar 6, 2023

    @pradeeban
    MemberAuthor

    Hi @parteekcoder, I can reproduce this even in your own github deployment.

    You need MacOS and Chrome to reproduce this.

    Open the demo/pm.py and highlight all the text. You will see the issue. The cursor is off by a few lines - especially noticeable in large files.

  22. parteekcoder commented on Mar 6, 2023

    @parteekcoder

    Can you please send a small video

  23. parteekcoder commented on Mar 6, 2023

    @parteekcoder

    It will be difficult to solve until I reproduce it

  24. pradeeban commented on Mar 6, 2023

    @pradeeban
    MemberAuthor

    It could be an issue that is specific to certain versions of MacOS? Both Mark and I were able to reproduce this. If you cannot reproduce it, please do not attempt a fix.

    Please see the Screenshot.

  25. sairajchouhan commented on Nov 6, 2023

    @sairajchouhan

    hey @pradeeban did you find any solution for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions