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

Abnormal Letter-Spacing misplaces caret #109

Open
ultimate-tester opened this issue Feb 20, 2020 · 4 comments
Open

Abnormal Letter-Spacing misplaces caret #109

ultimate-tester opened this issue Feb 20, 2020 · 4 comments
Labels

Comments

@ultimate-tester
Copy link

Quite simple problem, having an abnormal letter-spacing will prevent the caret aligning properly. The CSS used by CodeFlash should reset the letter-spacing to the default, which is letter-spacing: normal;

image

@brentkelly
Copy link

See below - this same problem exists with a stock standard markdown highlighted example. Problem persists even when setting letter-spacing: normal; for all elements.

example

See the following pen: https://codepen.io/brentkelly/pen/gOabdmQ

NB: https://github.com/ClickSimply/nanoEditor doesn't seem to suffer this issue.

@kazzkiq kazzkiq added the bug label Jun 4, 2020
@kazzkiq
Copy link
Owner

kazzkiq commented Jun 4, 2020

CodeFlask works by syncing textarea text with highlighted editor text. So any differences in letter-spacing (or any other font or spacing CSS properties) will misplace caret.

In your case you changed letter-spacing in your project CSS on purpose? Or was it a side-effect of a CSS meant to style other part of your project?

@ultimate-tester
Copy link
Author

CodeFlask works by syncing textarea text with highlighted editor text. So any differences in letter-spacing (or any other font or spacing CSS properties) will misplace caret.

In your case you changed letter-spacing in your project CSS on purpose? Or was it a side-effect of a CSS meant to style other part of your project?

Thanks for responding. In my case it was the latter. Other CSS in my project caused this as a side effect. My advice is to reset the letter-spacing (or take it into account) for CodeFlask.

@kazzkiq
Copy link
Owner

kazzkiq commented Jun 5, 2020

Yep. But the issue is that other styles can still leak into CodeFlask editor. Is basically a non-ending nightmare when you run without sandboxed code.

I believe this kind of issue will vanish with #119.

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

No branches or pull requests

3 participants