Scroll to the top after switching dir

Fixes #7061

Please review @jancborchardt @karlitschek @schiesbn @kabum