philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
22.59k stars 2.45k forks source link

Find mode doesn't work inside elements with display property set as contents #4492

Open victoragcosta opened 3 weeks ago

victoragcosta commented 3 weeks ago

Describe the bug

When using find mode (the "/" command) the search doesn't display any results inside elements with the display property set to the value contents. I have checked the code and debugged and found that the method element.checkVisibility() returns false when display property is contents, however, even though these elements are hidden, its children are visible. This is extremely bad as I've noticed this in a website with a div with style display: contents; as a parent to the whole page.

To Reproduce

Steps to reproduce the behavior:

  1. Go to URL 'https://kit.svelte.dev/docs/creating-a-project'
  2. Type "/cd\<enter>"
  3. Notice how the exact word "cd" inside the codeblock isn't being highlighted.

Include a screenshot if applicable.

Browser and Vimium version

I'm using Brave version 1.66.118 with Chromium: 125.0.6422.147 (Official Version) 64 bits

I'm using Vimium version 2.1.2