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

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

Open
pradeeban opened this issue Oct 26, 2022 · 23 comments
Open

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

pradeeban opened this issue Oct 26, 2022 · 23 comments
Labels
bug Something isn't working

Comments

@pradeeban
Copy link
Member

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

@pradeeban pradeeban changed the title The program editor cursor is off. The program editor cursor is off by a few lines Oct 26, 2022
@Aviral09
Copy link

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.

@pradeeban
Copy link
Member Author

great. Looking forward to the PR. Thanks.

@Aviral09
Copy link

Aviral09 commented Nov 2, 2022

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

@pradeeban
Copy link
Member Author

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.

@pradeeban
Copy link
Member Author

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

@pradeeban
Copy link
Member Author

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

@pradeeban
Copy link
Member Author

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

@pradeeban pradeeban 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) Nov 2, 2022
@Aviral09
Copy link

Aviral09 commented Nov 3, 2022

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)

@pradeeban
Copy link
Member Author

pradeeban commented Nov 3, 2022

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).

@Aviral09
Copy link

Aviral09 commented Nov 4, 2022

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.

@pradeeban
Copy link
Member Author

Great found. Thanks.

@parteekcoder
Copy link

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

@pradeeban
Copy link
Member Author

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.

@parteekcoder
Copy link

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"

@pradeeban
Copy link
Member Author

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).

@parteekcoder
Copy link

parteekcoder commented Feb 13, 2023

OK I will look into this issue

@pradeeban
Copy link
Member Author

Great. Thanks.

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

@parteekcoder
Copy link

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

@pradeeban
Copy link
Member Author

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.

@parteekcoder
Copy link

Can you please send a small video

@parteekcoder
Copy link

It will be difficult to solve until I reproduce it

@pradeeban
Copy link
Member Author

pradeeban commented Mar 6, 2023

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.

@sairajchouhan
Copy link

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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants