Fix cursor misalignment issue with long code snippets
Current behavior
The writing cursor becomes vertically misaligned as the number of lines in a code snippet increases. By around 2000 lines, the cursor is noticeably elevated, and by 3000 lines, it is significantly off, making text selection difficult.
Expected behavior
The cursor should remain properly aligned regardless of the number of lines in the code snippet, similar to the behavior in other editors like Sublime or TextEdit.
Steps to reproduce
- Create a code snippet with 2000 to 3000 lines.
- Observe the cursor alignment as you add more lines.
WordPress version
Please specify the version of WordPress you are using.
Code Snippets version
Please specify the version of Code Snippets you are using.
Code Snippets license
Core (free)
Anything else?
Attached images demonstrate the misalignment issue: image.png, cursor_alignment.png
conversation id: m232raeq-d92b9b05-b1e3-423f-810b-3ad240c05622
Tested further to eliminate external factors.
- Deleted all code from Customize/CSS
- Disabled ALL Code snippets.
- Disabled ALL plugins except Code Snippet Pro.
- Changed theme to twenty-twenty-four
- Added 1 new snippet containing only the number 1 down to several thousands rows.
Issue persists. Only becomes noticeable after a thousand or two thousand rows, but gets increasingly worse the more rows you add. Issue not related to computer (Macbook M4 Air), other text editors (eg. Sublime) have no issue.