Prior to this revision, seeking to the next or previous occurrent would
scroll the page regardless of whether the occurrence was in the current
viewport or not. This was frustrating for some users, so I improved the
logic to check if the next/previous element is in the viewport before
scrolling.
Fixes #259
Changes Proposed in this Pull Request:
Prior to this revision, seeking to the next or previous occurrent would scroll the page regardless of whether the occurrence was in the current viewport or not. This was frustrating for some users, so I improved the logic to check if the next/previous element is in the viewport before scrolling.