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

Copy and paste function aren't work properly #14197

Closed
foxhoundsk opened this issue May 21, 2018 · 18 comments
Closed

Copy and paste function aren't work properly #14197

foxhoundsk opened this issue May 21, 2018 · 18 comments
Assignees
Labels
0.22.x-single-webview Issue first seen on single-webview build against v0.22.x branch bug feature/context-menu needs-info Another team member needs information from the PR/issue opener. QA/checked-Linux QA/checked-macOS QA/checked-Win64 release-notes/include

Comments

@foxhoundsk
Copy link

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: 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

Reproducible on current live release:

Yes.

Additional Information

Thanks for providing a good browser!!

@LaurenWags LaurenWags added bug feature/context-menu 0.22.x-single-webview Issue first seen on single-webview build against v0.22.x branch labels May 21, 2018
@LaurenWags LaurenWags added this to the 0.22.x Release 4 (Beta channel) milestone May 21, 2018
@bsclifton bsclifton self-assigned this May 21, 2018
@bsclifton
Copy link
Member

@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!

@bsclifton bsclifton added the needs-info Another team member needs information from the PR/issue opener. label May 22, 2018
@bsclifton
Copy link
Member

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

@bsclifton bsclifton removed their assignment May 22, 2018
@btlechowski
Copy link
Contributor

btlechowski commented May 22, 2018

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

@bsclifton bsclifton self-assigned this May 22, 2018
@bsclifton
Copy link
Member

@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?

@foxhoundsk
Copy link
Author

foxhoundsk commented May 22, 2018

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!!

@btlechowski
Copy link
Contributor

@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

@ghost
Copy link

ghost commented May 23, 2018

@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.

@foxhoundsk
Copy link
Author

foxhoundsk commented May 23, 2018

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!

@srirambv
Copy link
Collaborator

srirambv commented May 23, 2018

+1 from @tommycarstensen via brave/brave-browser#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.

@bsclifton bsclifton modified the milestones: 0.22.x Release 4 (Beta channel), 0.22.x Release 5 May 23, 2018
@bsclifton
Copy link
Member

+1 from @alexchee via #8000 (comment)

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. Fixed copy paste issues - MacOS & Windows 10 #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

@srirambv
Copy link
Collaborator

@bsclifton bsclifton modified the milestones: 0.22.x Release 5 (Release channel), 0.22.x w/ Chromium 67 (BETA Channel) May 29, 2018
@MacGurus
Copy link

MacGurus commented Jun 4, 2018

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

@bsclifton
Copy link
Member

bsclifton commented Jun 4, 2018

@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 #14295

@bsclifton
Copy link
Member

bsclifton commented Jun 5, 2018

@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

@bsclifton
Copy link
Member

bsclifton commented Jun 7, 2018

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

@bsclifton
Copy link
Member

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

@bsclifton
Copy link
Member

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

@GeetaSarvadnya
Copy link
Collaborator

GeetaSarvadnya commented Jun 20, 2018

Verified on Windows 10 x64
• 0.23.11 6565c06
• 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.22.x-single-webview Issue first seen on single-webview build against v0.22.x branch bug feature/context-menu needs-info Another team member needs information from the PR/issue opener. QA/checked-Linux QA/checked-macOS QA/checked-Win64 release-notes/include
Projects
None yet
Development

No branches or pull requests

8 participants