detect scroll position and update comment nav index accordingly for better commentnav when the mouse is involved