performFind and performBackwardsFind do not always scroll view to the current match and not always highlight the match
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When there are several matches in different places on the page, performFind and performBackwardsFind do not always scroll view to the current match.
The matched text is not always highlighted.
It's reproducible for both regexp and regular searches.
To Reproduce - 1
- https://jira.atlassian.com/browse/BSERV-3900
- Click on collapsed comments to expand them all
- Type "/on", hit Enter
- Perform
performBackwardsFindseveral times (orperformFindmany times), to match with the latest matches
Expected - 1
Each performBackwardsFind (or performFind) scrolls the page (if needed) and make the match clearly visible.
Actual - 1
For some matches, the page is not scrolled. For such a match, the page could be scrolled by a mouse and you'll see that the match is highlighted as usually, but there was no auto page scroll to it. For some matches, there is no nor scroll nor highlighting.
To Reproduce - 2
- https://medium.com/rubycademy/learn-ruby-on-rails-28f5ceb609f8
- Close authorization pop-up (if any)
- Type "/on", hit Enter
- Perform
performFindseveral times
Expected
Each performBackwardsFind (or performFind) scrolls the page (if needed) and make the match clearly visible.
Actual
The first 3 performFind does not highlight anything.
The same happens right before the end of the page, for the two last matches.
After the end of the page, the next 3 performFind (when search restarted from the beginning) doesn't highlight anything and doesn't scroll the page to the match.
After that, the next performFind scrolls to the top of the page and highlights the 4th match (the first that was visible on the page).
When scrolling the page by mouse, I can't see where are the "invisible" matches.
Browser and Vimium version
Google Chrome | 87.0.4280.67 (Official Build) (x86_64)
OS | macOS Version 10.15.7 (Build 19H2)
JavaScript | V8 8.7.220.25
User Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36
Vimium Version: 1.66
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementations and tests, if any, for performFind and performBackwardsFind, then reproduce the behavior on the Jira and Medium URLs using both regular and regexp searches. Done means every match is highlighted and the page scrolls to it when repeated forward or backward searches reach matches outside the current view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100