Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the copy clone link to clipboard button of git does not work if clicked on using hints mode. #3103

Open
rnmhdn opened this issue Aug 24, 2018 · 2 comments

Comments

@rnmhdn
Copy link

rnmhdn commented Aug 24, 2018

If I click on this button with mouse it works but with hint mode it doesn't:

<clipboard-copy value="https://github.com/philc/vimium.git" aria-label="Copy to clipboard" class="btn btn-sm" tabindex="0" role="button">
      <svg class="octicon octicon-clippy" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"></path></svg>
    </clipboard-copy>
@adamtabrams
Copy link

@aranmohyeddin I've been having the same issue (with Firefox and OSX). Have you found a solution to this? I'm amazed that this issue has not been responded to yet.

@gdh1995
Copy link
Contributor

gdh1995 commented Nov 11, 2019

Updated: this issue is because on Firefox GitHub calls navigator.clipboard, but it refuses to copy data if not during a KeyboardEvent or MouseEvent.

I just reproduced it on my Firefox+Win10, and the only error message is "uncaught exception" on console, without any details. I'll do more tests in a few days. But as you can see Vimium is being developed very slowly, and some bug fixes are still not merged.

The below is an AD: you may try my "Vimium C" (https://addons.mozilla.org/en-US/firefox/addon/vimium-c), and I've confirmed that it supports the clipboard button.

gdh1995 added a commit to gdh1995/vimium-c that referenced this issue Dec 3, 2019
Let the activation system inherit status from a latest keyboard event,
  to avoid potential crashes.
Add support for simulated `setTimeout`.
Fix a typo in `VHints.doesDelayToExecute_`.

See philc/vimium#3103 (comment) .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants