philc / philc/vimium

yank commands with 1.67.4 don't work on Brave Browser

Open
#4,200 10 comments 18 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

Describe the bug
yy and yf commands with Vimium 1.67.4 don't work on Brave Browser (Chromium-based).

yank commands with 1.67.4 show a popup Yanked ... but nothing is copied.
Console always gets an error below (screenshot):

hud.js:152 Uncaught (in promise) DOMException: Must be handling a user gesture to use custom clipboard
(anonymous) @ hud.js:152
setTimeout (async)
setTimeout @ utils.js:278
copyToClipboard @ hud.js:145
(anonymous) @ hud.js:174
ownerPagePort.onmessage @ ui_component_server.js:23

I confirmed that

  • on Google Chrome (Version 108.0.5359.124 (Official Build) (arm64)),
    • yank commands with Vimium 1.67.4 work.
    • yank commands with self-loaded Vimium 1.67.3 work.
    • Both Vimium 1.67.3 and 1.67.4 showed Vimium wants to See text and images copied to the clipboard popup and requested permission on the first time. (Screenshot of the popup)
  • on Brave Browser,
    • yank commands with Vimium 1.67.4 don't work.
    • yank commands with self-loaded Vimium 1.67.3 work.
    • Both Vimium 1.67.3 and 1.67.4 didn't show a popup asking permission.
    • Even if clipboard permission is given manually, yank commands with Vimium 1.67.4 don't work. (Screenshot of manually given permission)
1.67.3 1.67.4
Google Chrome
Brave Browser w/o manual permission: ❌, w/: ❌

To Reproduce
Steps to reproduce the behavior:

  1. Go to any website.
  2. Try yy or yf.

Browser and Vimium version
Brave Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) (arm64)
Vimium 1.67.4
macOS 12.6.2

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 with hud.js at copyToClipboard around lines 145-152 and trace the message from ui_component_server.js:23, using the Brave reproduction with yy or yf. Done means Vimium 1.67.4 copies the yanked text in Brave without the user-gesture DOMException, while the existing Chrome behavior remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
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.