Mouseover for non-link items
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
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 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