The cursor places incorrectly


#1

Please help me fix the cursor places in line


#2

Does this persist when you type something or call the refresh() method? If so, the editor was probably initialized at a point where its layout wasn’t stable yet (maybe fonts or style sheets were still loading), and it incorrectly measured the text size. If that’s the case, you’ll have to either make sure it loads later, after layout is stable, or arrange a call to refresh to be called when the page has fully loaded.


#3

Does this persist when you type something or call the refresh() method? ==> when I scroll down it works fine, I already tried to use refresh but it did not work, I am using codemirror with angular 5