Fix back/forward navigation after clicking on a link

The condition was incorrect; we were ignoring history when not in the
middle of scrolling when we wanted to do the reverse.

BUG: 414701
FIXED-IN: 20.12
2 jobs for master in 29 minutes and 10 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #75675
clang_format

00:01:44

passed #75674
linux kf5-qt5 qt5.12

00:27:25

45.0%