Fixed detection of links which are only partially inside the viewport