Fixed scrolling to visible index when element was partially shown