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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste in Vim mode doesn鈥檛 work on Firefox #4878

Closed
3 tasks done
bpierre opened this issue Sep 10, 2020 · 3 comments
Closed
3 tasks done

Paste in Vim mode doesn鈥檛 work on Firefox #4878

bpierre opened this issue Sep 10, 2020 · 3 comments

Comments

@bpierre
Copy link

bpierre commented Sep 10, 2020

馃悰 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Description of the problem

Pasting with the Vim mode using Ctrl+v triggers the following error:

TaskQueue: Error running task. Failed to handle key=<C-v>. navigator.clipboard.readText is not a function.

How has this issue affected you? What are you trying to accomplish?

I would like to paste in Vim mode.

To Reproduce

  1. Use Firefox.
  2. Activate Vim mode
  3. Enter in edition mode (e.g. by pressing i).
  4. Hit Ctrl+v.

Your Environment

Software Name/Version
小odesandbox Latest
Browser Firefox Nightly (latest)
Operating System Arch Linux
@SaraVieira
Copy link
Contributor

Hey

I went really deep in this bug to try and figure out what was wrong since I tested in Firefox on my MacBook and it did work.

So I installed Virtual Box to test on Linux and indeed it does not work and it works in Chrome on Linux(ubuntu 1804), with WAAAAY more digging I found out that it's actually a Firefox on Linux issue that does not allow read from the clipboard in Javascript.

A friend of mine that works for electron helped me figure out that the way Firefox reads from the clipboard using something different to get the clipboard data, she even found the file:

https://github.com/mozilla/gecko-dev/blob/63ad13457c9b5e0757edded4999625f9466b8228/widget/gtk/nsClipboard.cpp

I filed an issue on Bugzilla firefox bugs tracker and let's hope they can fix this:
https://bugzilla.mozilla.org/show_bug.cgi?id=1664318

Long story short there is nothing we can do since this seems to be a firefox bug only on Linux :(

Sorry about the issue, but I will close it

Thank you for this bug, I learned a lot!

@bpierre
Copy link
Author

bpierre commented Sep 11, 2020

Ah too bad, I was so close to be able to use CodeSandbox in Vim mode again haha. Thanks for having spent the time to understand the issue and file a bug, I will follow it closely 馃憖

@SaraVieira
Copy link
Contributor

I know, made me super sad too, it was so long we had that disabled and soooo close :(

If it does work I will mention it here too :)

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

2 participants