Adjust scroll position when navigating with the keyboard