Basically when I scroll while the cursor is above the scrollPane, it disables the autoscrolling, which is handled by a JTextArea Caret.
Not sure, but maybe you can use Smart Scrolling.
It disables automatic scrolling when the scrollbar is not at the bottom of the scroll pane.