philc / philc/vimium

Feature Request: doubleclick

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

Add functionality for doubleclicking.

The only place I can find where this is useful is spotify web player, but presumably there are other places. The problem I have on spotify is that you need to doubleclick tracks to get them to play. If I do 2f[keys], it doesn't have the desired effect. I'm assuming because the sequence
["mouseover", "mousedown", "mouseup", "click"]
is repeated, but "dblclick" doesn't happen.

I've hacked about a bit in the source code, and this code does what I want:

mouseEvent = new MouseEvent('dblclick', {
    'view': window,
    'bubbles': true,
    'cancelable': true
});
element.dispatchEvent(mouseEvent)

Maybe this could be implemented as 2f[keys] or f2[keys]?

Alternatively we can just add the 'dblclick' event every time we click. This doesn't seem to affect anything except spotify, where it causes the desired (and intuitive) behaviour.

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 the source code handling 2f[keys] and f2[keys], then compare it with the existing mouse event sequence of mouseover, mousedown, mouseup, and click. Verify the chosen behavior against Spotify Web Player and confirm that double-clicking tracks produces the expected playback without breaking ordinary clicks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.