Skip to content

Text as direct child of shadow-root prevents link hint #4620

Open
@sersorrel

Description

Describe the bug

Given the following structure, where <custom-element> is the root of a shadow DOM:

<a href="...">
  <custom-element>
    some text
  </custom-element>
</a>

a link hint will not appear on the <a> even though it should.

The cause is that LocalHints.getElementFromPoint does not return any element (because it sees that <custom-element> is a shadow root and tries to recurse into it, but elementsFromPoint apparently does not return text nodes), so the nonOverlappingHints step decides that the <a> element is not actually visible.

To Reproduce

Steps to reproduce the behavior:

  1. Go to URL Text as direct child of shadow-root prevents link hint #4620
  2. Press f, and try to click on the date this issue was opened ("now" in the screenshot below)
  3. Observe that there is no link hint

image

Browser and Vimium version

Firefox 134.0.2, Vimium 2.1.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions