jquery / esprima

ECMAScript parsing infrastructure for multipurpose analysis
http://esprima.org
BSD 2-Clause "Simplified" License
7.06k stars 786 forks source link

Fix curser misplacement in editor #2095

Closed nanyang24 closed 3 years ago

nanyang24 commented 3 years ago

Fixed bug reported in https://github.com/jquery/esprima/issues/2028

After my testing, the cursor misplacement problem only occurs in macOS Chrome. So the solution is that something is interfering with Monaco's cursor positioning.

image

The global CSS base configuration interferes with the Monaco editor fonts.

So, We should specify FontStyle in Monaco options, not in our CSS.

After testing, it works well.

ariya commented 3 years ago

Great work @nanyang24, thank you!