This happens to me in my macbook in other apps as well. I have "Tap to Click" enabled and that makes that while you type you touch the trackpad by mistake and moves the cursor around. There is a app to fix that issue. Just search for "Tap to Click" in the app store and you will find it.
Cursor jumps several lines up when typing in a note
in General Technical Issues
Posted
This happens to me in my macbook in other apps as well. I have "Tap to Click" enabled and that makes that while you type you touch the trackpad by mistake and moves the cursor around. There is a app to fix that issue. Just search for "Tap to Click" in the app store and you will find it.