Fix for Exception when pressing PgDn in a code without scrollbar #2990