metosin/komponentit

Codemirror with parinfer does not scroll when adding newlines

MattiNieminen opened this issue · 1 comments

http://metosin.github.io/komponentit/#!/example.codemirror

Steps to reproduce:

  1. Insert cursor after content in normal codemirror view. Start pressing enter to add newlines. When newlines no longer fit into the view, scrollbar appears and content from top scrolls out of view. => Works as intended

  2. Now insert the cursor after content in parinfer version of the view. Start pressing enter again to add newlines. When the view cannot fit all the content, scrollbar appears normally. However, the content from top does not scroll out of view. Instead, the scroll position stays where it is, and the newlines are being added to the part of the view which is not currently visible due to scrollbar position.

Same thing happens horizontally as well; the view does not scroll even if content is added outside the current scrollbar position.

The same thing happens when moving cursor with arrow keys (existing content).

Fixed by 50cfb5d