Fix for sorting not working on scrollable div and inside of elements whose locations are further down the page