Fixes #14232. Do not change the view if not scrolling on the X axis. Thanks Sebastien Brunot (IBM CCLA)
(cherry picked from commit edfbe1ce9e86dfe9242b634aa071c3caa57edd65)