Fixes a scrolling offset issue when reaching to top and dismissing the keyboard with panning.