Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Clipboard copy (cmd+c / ctrl+c) doesn't always work #10563

Closed
bsclifton opened this issue Aug 17, 2017 · 32 comments · Fixed by brave/muon#317
Closed

Clipboard copy (cmd+c / ctrl+c) doesn't always work #10563

bsclifton opened this issue Aug 17, 2017 · 32 comments · Fixed by brave/muon#317
Assignees
Labels
bug misc/clipboard priority/P1 Blocks development or testing. Product cannot run. Must be fixed immediately, shipped next release. QA/checked-Linux QA/checked-macOS QA/checked-Win64 QA/test-plan-specified release-notes/include

Comments

@bsclifton
Copy link
Member

bsclifton commented Aug 17, 2017

Test plan

  1. Use Brave for a while
  2. Try to copy / paste using cmd+c (or on Windows ctrl+c)
  3. Make sure that clipboard gets updated

  • Did you search for similar issues before submitting this one?
    yes

  • Describe the issue you encountered:
    If you're on a webpage and you do cmd+c (or ctrl+c) to copy something, it doesn't always work (most of the time it does work). Nothing is copied (clipboard contents remain unchanged). However, if you right click and choose "copy" from the menu, it works fine.

We had fixed this in the past by reverting this commit:
6df066c

However, reverting this introduces a problem where the copy works... but it copies the URL instead of the

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    macOS

  • Brave Version (revision SHA):
    0.18.23

  • Steps to reproduce:

    1. Use Brave for a while
    2. Try to copy / paste using cmd+c (or on Windows ctrl+c)
    3. Be disappointed when it doesn't update clipboard. The previous contents are there
  • Actual result:
    Clipboard gets updated

  • Expected result:
    Nothing happens to clipboard

  • Will the steps above reproduce in a fresh profile? If not what other info can be added?

  • Is this an issue in the currently released version?
    yes

  • Can this issue be consistently reproduced?
    No

  • Extra QA steps:
    1.
    2.
    3.

  • Screenshot if needed:

  • Any related issues:
    cc: @bbondy who has also seen this and @NejcZdovc who reports a similar issue

@LaurenWags
Copy link
Member

+1 from community - user noted that it happens when Brave is open for awhile. https://community.brave.com/t/unable-to-copy-from-address-bar/5999

@CoalaJoe
Copy link

I can reproduce on Linux.

@kiyomasa-slotet
Copy link

kiyomasa-slotet commented Aug 20, 2017

  • Describe the issue you encountered:
    same as @bsclifton
    This issue would be fine when I reboot Brave.

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    OS X El Capitan (10.11.6)

  • Brave Version (revision SHA):
    36ae2ec

  • Actual result:
    Clipboard gets updated

  • Expected result:
    Nothing happens to clipboard

  • Is this an issue in the currently released version?
    Yes and this issue exist since I installed Brave fist time. I guess my first version was 0.11.4
    I did not notice 6df066c

@eljuno
Copy link
Contributor

eljuno commented Aug 22, 2017

+1 from community https://community.brave.com/t/basic-keyboard-shortcuts-like-copy-and-paste-do-not-work/6357?u=eljuno

Basic keyboard shortcuts that are universal on all platforms dont work at all in brave

@bsclifton bsclifton added this to the 0.19.x (Beta Channel) milestone Aug 22, 2017
@bsclifton
Copy link
Member Author

Pulling into 0.19.x as this is a really nasty issue

@ricardosaracino
Copy link

I also have a similar issue where ctrl+c works but right click copy does not. Kind of sporadic
windows
36ae2ec

@patrick99e99
Copy link

+1

I just tried copying someone's email address from a webpage, and when I go over to my email client and do cmd-v to paste, the value is the previous item I had copied... I try cmd-c over and over and over, I see the edit menubar tab flash, but yet the value is not actually getting copied.

@bsclifton
Copy link
Member Author

I'm not 100% sure, but it would be worth trying this out next time you all experience the issue. Close the browser, re-open and then try again. If that works, then I suspect I know the root cause.

After 10 minutes of a tab being idle, it will automatically be suspended. If it becomes active again, it should work as expected. However, I suspect the code has a reference to the old web contents

cc: @bridiver

@patrick99e99
Copy link

I can say that the last time this happened, it was definitely tab specific. I remember I had gone to a youtube video and was trying to contact the content creator, but I could not copy their address from that page... I switched tabs and could copy/paste just fine.. and then going back to the youtube tab, again I could not copy... After quitting Brave and relaunching, I went back to that same youtube channel and was able to copy their address.

@bsclifton
Copy link
Member Author

@patrick99e99 awesome! thanks for confirming 😄 The feature I described above (which I had forgot the name of) is tab discarding

@bsclifton
Copy link
Member Author

@darkdh would you have time to help me with this one?

@ricardosaracino
Copy link

Still having issues with right click copy in ddfddfb

image

@mayeaux
Copy link

mayeaux commented Sep 2, 2017

My command + C is not working to copy on a Mac, but works if I right click and copy (which of course is a PITA).

@bsclifton bsclifton self-assigned this Sep 3, 2017
@bsclifton
Copy link
Member Author

bsclifton commented Sep 6, 2017

Marking as macOS after testing on Windows for about an hour (and unable to reproduce)

@ricardosaracino are you specifically having problems with Ctrl + C in the URL bar? or are you using right click > Copy?

edit: re-reading, you're having problems with right click + copy. Is it only with the URL bar? or also with the content on the page?

@bsclifton bsclifton removed the OS/macOS label Sep 6, 2017
@bsclifton
Copy link
Member Author

I pulled the trigger too fast on the OS/macOS label

@jonathansampson and @lukemulks both report issues- will ask for more specific information

@jonathansampson
Copy link
Collaborator

This also affects me on Windows, intermittently. I often have to copy the URL via the devtools by running copy(location.href) from the console. While Brave has copy/paste issues, I have never run into any issues copying via the copy method in the developer tools' console.

@darkdh
Copy link
Member

darkdh commented Sep 6, 2017

100% reproducible steps

Scenario 1

  1. Right click any tabs to open a context menu
  2. Make the context menu disappeared by clicking options or elsewhere
  3. Go to any tabs
  4. You will find out each cmd+c will only copy url of the current tab

Scenario 2

  1. Select and copy some text on a tab
  2. Right click any tabs to open a context menu
  3. Make the context menu disappeared by clicking options or elsewhere
  4. You will see every cmd + c will be the text in step 1
  5. cmd +c on any URL bar
  6. You will find out each cmd+c will only copy url of the current tab

How to break the curse

  1. relaunch Brave
  2. make context menu in webview showed up and close

@bsclifton
Copy link
Member Author

Steps by @darkdh do not repro on Windows unfortunately- but easily repro on macOS

@bsclifton
Copy link
Member Author

Also can't reproduce with those steps on Linux (Ubuntu 14.04)

@ricardosaracino
Copy link

I have had a few updates since my last post, i havent had clipboard issues for a while now.

@pongraczi
Copy link

I experienced the same situation plus the weird middle-click-insert under linux does not work as expected. Ref: #10791
Still in 0.18.32

@NejcZdovc NejcZdovc added the priority/P1 Blocks development or testing. Product cannot run. Must be fixed immediately, shipped next release. label Sep 13, 2017
@darkdh
Copy link
Member

darkdh commented Sep 28, 2017

to be specific, the solution is available in 0.19.20 and above.
You can download the beta release here https://github.com/brave/browser-laptop/releases

@pongraczi
Copy link

Select text with mouse inside the browser, and middle click somewhere else (text editor for example) still sucks with this issue. It pastes from the normal clipboard.
So, middle click is still not reliable.

Brave: 0.19.23
rev: 7941690
Muon: 4.4.25
libchromiumcontent: 61.0.3163.100
V8: 6.1.534.41
Node.js: 7.9.0
Update Channel: Beta
OS Platform: Linux
OS Release: 4.11.0-14-lowlatency
OS Architecture: x64

@pongraczi
Copy link

Probably the middle click issue should continue here: #10791

bridiver added a commit to brave/muon that referenced this issue Oct 4, 2017
always call SetShowingContextMenu/NotifyContextMenuClosed
fix brave/browser-laptop#10563
also fixes flash context menu items not working
@luixxiul
Copy link
Contributor

https://community.brave.com/t/copy-paste-still-broken-in-0-19-48/9008

Copy/paste is still broken in Brave 0.19.48

Brave: 0.19.48
rev: de939f6
Muon: 4.4.28
libchromiumcontent: 61.0.3163.100
V8: 6.1.534.41
Node.js: 7.9.0
Update Channel: Release
OS Platform: macOS
OS Release: 16.7.0
OS Architecture: x64

There was an existing issue about this subject here Right click Copy and Paste doesn't always work1 but this has been closed prematurely.

Trying to copy selected text by pressing Cmd-C often does not work first time. I usually have to select “copy” from the right-click menu. Only then does Cmd-C work for subsequent copy/paste actions.

This error seems to be specific to each browser tab

@bbondy
Copy link
Member

bbondy commented Oct 16, 2017

@luixxiul pls track that in a new issue, I think the problem is a second similar problem in terms of side effects, but it is a distinct bug

@pongraczi
Copy link

#10791 ?
I still have this issue....

Brave: 0.19.50
rev: 5e2c26a
Muon: 4.4.28
libchromiumcontent: 61.0.3163.100
V8: 6.1.534.41
Node.js: 7.9.0
Update Channel: Beta
OS Platform: Linux
OS Release: 4.11.0-14-lowlatency
OS Architecture: x64

@luixxiul
Copy link
Contributor

Closing in favor of #11554

@kamal4o4
Copy link

I started using brave last week and this bug is still there. Steps to reproduce given by @darkdh : working!
my OS : Kali linux (Debian)

Brave: 0.21.24
V8: 6.5.254.36
rev: 19c78a1
Muon: 4.9.3
OS Release: 4.13.0-kali1-amd64
Update Channel: Release
OS Architecture: x64
OS Platform: Linux
Node.js: 7.9.0
Brave Sync: v1.4.2
libchromiumcontent: 65.0.3325.162

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.