Fix scrolling outer window after pageup/pagedown

Issue #2183