Browser-laptop: Copy and paste function aren't work properly

Created on 21 May 2018  Â·  18Comments  Â·  Source: brave/browser-laptop

Description


During browsing, text which is copyable won't being copied using copy button in right click menu, but the ctrl+c is work properly, and same as paste in right click menu (text in copy buffer is for sure due to ctrl+v worked).

Steps to Reproduce

  1. Go to a page which text is copyable.
  2. Try to copy some text with copy button in right click menu and paste it with ctrl+v or paste button in right click menu.
  3. Now, try to copy and paste same text with ctrl+c and ctrl+v, it worked properly.

Actual result:

Expected result:

Copy and paste implemented by browser should work properly.

Reproduces how often:

Brave Version

about:brave info:

Brave: 0.22.714
V8: 6.6.346.26
rev: fa2fbcae947e001528bd3bd5b1c453805d419af6
Muon: 6.0.9
OS Release: 10.0.17134
Update Channel: Release
OS Architecture: x64
OS Platform: Microsoft Windows
Node.js: 7.9.0
Brave Sync: v1.4.2
libchromiumcontent: 66.0.3359.139

Reproducible on current live release:

Yes.

Additional Information

Thanks for providing a good browser!!

0.22.x-single-webview Qchecked-Linux Qchecked-Win64 Qchecked-macOS bug featurcontext-menu needs-info release-noteinclude

Most helpful comment

@bsclifton Cool to see you are also in Chandler, been a huge fan of the project and never realized. I just posted this on the community Brave page as well.

The following process has allowed me to replicate the issue several times in a row:

  • Have several browser tabs open with the browser set up to restore previous tabs.
  • Close the browser since the issue is triggered sometime after opening with previous tabs.
  • Reopen the browser seeing all of your old tabs.
  • Hover over a tab different from the current tab you are viewing, within a couple seconds you will see it is refreshing the tab. At this point the copy + paste is broken.
  • If that didn’t break it, try hovering a tab to get it to reload, then move your cursor across other tabs to trigger them to also reload.

It seems to be fine for me until I hover a tab (other than the current tab) to get it to reload/refresh.

All 18 comments

@flawless0714 I'm on Windows 10 using the same version (0.22.714) and I'm having trouble trying to reproduce the problem. Are you still actively experiencing the issue? Does it affect all copy/pastes? or just in a particular tab? Are you switching between tabs before doing the copy/paste?

Any more info would be very much appreciated. Thanks!

Scenarios I've tried:

  • Open website, select text on page, right click => copy, paste into Notepad
  • Open two websites, select text on website 1, switch to website 2, select text, right click => copy, paste into Notepad
  • Have multiple windows with multiple tabs, select text on window 1, switch to window 2, select text on window 2, right click => copy, paste into Notepad
  • Open website 1 in one tab and use middle click to open a child page in a new tab, select text on website 2, right click => copy, paste into Notepad

(and probably a few others I've tried too)

Tested on Windows 10 x64 and macOS

I found reliable STR. Reproduced by me @kjozwiak on Windows 7, Windows 10, Ubuntu 17.10 and Mint 18.3 x64. Not reproducible on Mac.

  1. Go to youtube.com
  2. Right click on a video and open in through 'Open link in new tab'
  3. Hover over the opened tab to show its preview
  4. Activate the opened tab
  5. Try to Cut/Copy/Paste the URL in the URL field through Context Menu

@btlechowski that only seems to happen with the URL bar (never with the content on the page). Still needs to be fixed... but can you confirm copying content on the page is working as expected?

Ahh..., I should sorry at first, I just found that after restart Brave, the issue has gone..., this make it more complicated to address the issue, the only information I can provide now is that I hibernate my PC every day I went away from it with Brave openned with about 5 or 6 tab.

Edited: will report the status after I hibernate my PC this time.

Keep going!!

@bsclifton Also reproduced on Textbox. Ubuntu 17.10 x64 v0.22.718.

STR:

  1. Go to about:about
  2. Right click on about:styles and open in through 'Open link in new tab'
  3. Hover over the opened tab to show its preview
  4. Activate the opened tab
  5. Scroll down to 'Plain Textbox'
  6. Type 'asdf' into the Textbox
  7. Try to Cut/Copy/Paste in the Textbox through Context Menu

@bsclifton Cool to see you are also in Chandler, been a huge fan of the project and never realized. I just posted this on the community Brave page as well.

The following process has allowed me to replicate the issue several times in a row:

  • Have several browser tabs open with the browser set up to restore previous tabs.
  • Close the browser since the issue is triggered sometime after opening with previous tabs.
  • Reopen the browser seeing all of your old tabs.
  • Hover over a tab different from the current tab you are viewing, within a couple seconds you will see it is refreshing the tab. At this point the copy + paste is broken.
  • If that didn’t break it, try hovering a tab to get it to reload, then move your cursor across other tabs to trigger them to also reload.

It seems to be fine for me until I hover a tab (other than the current tab) to get it to reload/refresh.

Hi guys, after my PC wake up from hibernate, it seems everything works fine. And I tried what @jtellingson said, it broke, so I guess this is the bug which triggered the issue I opened!

+1 from @tommycarstensen via https://github.com/brave/brave-browser/issues/219

Often I cannot copy/paste within and from Brave to another application. I'm on version 0.22.714, but I'm unable to provide further information, because copy/paste is broken most of the time. I'm on MacOS 10.11.6.

+1 from @alexchee via https://github.com/brave/browser-laptop/issues/8000#issuecomment-391503628

I'm running into this issue but I have more information. I think it's involves multiple tabs with different sessions. It seems to work again for the first window opened and 6 tabs after moving a tab to the first position.

I am able to right click to copy & paste in the first 5 tabs on the first window. But any other tabs (i.e. session 2, session 3, default) or windows, right click to Copy does not copy the text. I am able to Copy with hotkeys cmd+C in any tabs.

Steps to Reproduce:

  1. Open a tab by clicking on +, visit a site (window 1)
  2. Open "New Session Tab 2", visit a site (ex. https://github.com/brave/browser-laptop/issues/8000)
  3. Open "New Session Tab 3", visit a site
  4. Open "New Session Tab 4", visit a site
  5. Open "New Session Tab 1", visit a site
  6. Open 3 more new tabs with + , visit a site
  7. Drag out a tab into a new Window (window 2)
  8. Select text in new Window tab (window 2)
  9. Right click and select "Copy" in context menu
  10. Paste into URL bar or text editor
  11. Repeat steps 9-10 on different tabs and windows

Actual result:
The pasted text does not match the intended selected copied text.

Expected result:
The pasted text should match the selected and copied text.

I haven't found a way to reproduce it consistently, maybe it's an issue with electron-clipboard. I'll update if I can find a way to consistently reproduce.

Additional Info:

Brave 0.22.714
V8  6.6.346.26
rev fa2fbca
Muon  6.0.9
OS Release  10.0.17134
Update Channel  Release
OS Architecture x64
OS Platform Microsoft Windows
Node.js 7.9.0
Brave Sync  v1.4.2
libchromiumcontent  66.0.3359.139

disabling TAB PREVIEWS on HOVER in settings seemed to have fixed the problem for a short while but after more extensive use of the browser right click to copy from both the address bar and text in pages again ceases to function properly but using CNTRL-C does work

this is a fairly serious impediment to using the browser so I hope it can be rectified soon

~@btlechowski I can no longer reproduce this on our current release (0.22.727) OR in the beta (0.22.806). Can you test and confirm if it's still an issue? Possibly fixed with https://github.com/brave/browser-laptop/pull/14295~

@jonathansampson has confirmed this is still an issue. I had originally tested on macOS; after re-testing on Windows, I can reproduce the issue still

Reproduced locally with debug build of Muon... digging in more now. Definitely related to the tab preview functionality (maybe wrong frameKey is being set in browser-laptop). When a bad copy happens, the web contents IS getting the copy... but I suspect not the right web contents

The only difference in the browser-laptop side that I can see is that the preview is attaching to the web view BEFORE the tab is switched to. Versus preview being off, where it attaches as the last step

Root cause is that wrong web contents is being returned when calling electron.webcontents.getFocusedWebContents. Getting a lot closer to finding the fix

Verified on Windows 10 x64
• 0.23.11 6565c0689f8bfbd6f4d03e2e8c68c9381da157f6
• Muon 7.1.0
• libchromiumcontent 67.0.3396.87

Verified on Ubuntu 17.10 x64

  • 0.23.11 - 6565c06
  • Muon - 7.1.0
  • libchromiumcontent - 67.0.3396.87

Verified with macOS 10.12.6 using

  • 0.23.14 f4da855
  • Muon 7.1.1
  • libchromiumcontent 67.0.3396.87
Was this page helpful?
0 / 5 - 0 ratings