philc / philc/vimium

Bug: find not jumping to match in html code tags

Open
#4,827 1 comment 0 reactions 0 assignees View on GitHub

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 searching (find with "/") in e. g. files or logs in Gitlab the find matches text, but it doesn't jump to it anymore. After inspecting the html page it seems to happen when matches are inside a <code> block. It seemed to work fine until a few weeks, but maybe Gitlab changed something in their implementation.

To Reproduce

Steps to reproduce the behavior:

  1. Go to URL https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/channels/graphql_channel.rb
  2. Enter find mode with '/'
  3. Search for 'end'
  4. Cycle through matches with 'n'
  5. Doesn't jump to matches out of view

See 7 matches of 'end' but only 3 in first screenshot. Third match got highlighted and if you cycle through further no match will be highlighted, so it's at the next match but out of focus.

Image

You can also search for text out of view and it shows matches but not focus/highlight them because it doesn't jump to the match.

Image

Alternative URL for bigger screens with higher resolution:
1.) Go to https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/abuse_reports/components/abuse_category_selector.vue
2. Search for 'template'

Browser and Vimium version

Google Chrome 143.0.7499.193 (Official Build) (arm64)
Revision fc6af963edebc86a5d6779e29b94312ebe911538-refs/branch-heads/7499@{#4084}
OS macOS Version 15.5 (Build 24F74)
JavaScript V8 14.3.127.17
User agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Vimium 2.3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue at the GitLab URL: enter find mode with '/', search for 'end', and cycle matches with 'n', including matches inside code blocks. Trace the find navigation and focus behavior for out-of-view matches; done means every match is highlighted and brought into view when cycling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.