Add automatic scrolling. Fixes #2296.