When the cursor is outside of viewport, in Mathquill the cursor stay hidden unless the user scroll. Normally like in normal calculator views the mathfield should auto-scroll with the cursor so the cursor is always shown to the user.
Behavior of Other Math editors : https://i.imgur.com/1JbRv2F.gifv
Behavior of Mathquill : https://i.imgur.com/9E15uS2.gifv
I have tried to check if the cursor is outside viewport then I scroll automatically but the problem is the cursor lose the focus and become a null element and I can't scroll to it.
I solved this problem by using the following code :
First I added a function to detect if the cursor is outside viewport (source : https://stackoverflow.com/a/15203639/3880171)
I added onKeyUp Event to mathview :
<span id="expression" onkeyup="onEditorKeyPress()"></span>
finally, the function that do the magic of scrolling is :