philc / philc/vimium

Mouseover for non-link items

Open
#3,967 2 comments 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

Feature Request

The https://github.com/philc/vimium/wiki/Tips-and-Tricks#hovering-over-links-using-linkhints LinkHints.activateMode action=hover is excellent. However, some websites have non-link elements with mouseover event handlers, which means that this command can't see those mouseovers. It would be nice if there was a way to extend the link hints to these non-link elements with mouseover event listeners.

To Reproduce

Have a non-link HTML element with an event listener for "mouseover", and have a shortcut for LinkHints.activateMode action=hover.

For a concrete example, consider this StackOverflow answer's second snippet: https://stackoverflow.com/a/53491393

var text = document.getElementById('text')

text.addEventListener("mouseout", function() {
  text.textContent = "cat"
})

text.addEventListener("mouseover", function() {
  text.textContent = "dog"
})

Given the HTML:

<p id="text">
  cat
</p>

Running the code snippet and clicking in the snippet, using the keyboard shortcut to hover does not show a link hint on this element.

Note that the browser inspect tools show that this <p id="text"> element has event listeners for mouseout and mouseover.

Browser and Vimium version

  • Browser: Firefox 94.0
  • Vimium version: 1.67

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 tracing LinkHints.activateMode action=hover and reproduce the provided StackOverflow example in Firefox. Compare how existing link hints identify targets with the non-link element's mouseover listener; done means the non-link element receives a usable hint and triggers its mouseover behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.