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

Copy keyboard shortcut has randomly no effect #9352

Closed
alexstrat opened this issue May 2, 2017 · 17 comments
Closed

Copy keyboard shortcut has randomly no effect #9352

alexstrat opened this issue May 2, 2017 · 17 comments
Labels

Comments

@alexstrat
Copy link
Contributor

alexstrat commented May 2, 2017

I have been tracking this bug for weeks, it appears a priori randomly. Can't determine if it's a bug on Electron-side or on my side. I'm posting the description here with the hope it rings someone's bell.

  • Electron version: 1.6.6 - 1.7.1
  • Operating system: MacOS 10.12.4

Expected behavior

Select some text and hit Cmd+C
=> the selected text should be in clipboard, everytime

Actual behavior

The Cmd+C shortcut works fine, but at some point, a priori randomly, the shortcut stops working (clipboard is not updated with the selected text):

  • every following attempt fails until the app is restarted. Close/reopen the window has no effect.
  • however if you use copy via the contextual menu, 1/ it actually copies and 2/ the keyboard shortcut start working again (not constantly)
  • you can see the shortcut is triggered (can see the Edit menu "popping")
  • other shortcuts (like Cmd+V paste) work fine during the moment Cmd+C does not work

How to reproduce

I haven't found a way to constantly reproduce the bug.
My app is made of several webviews stacked on top of each other, and getting the focus alternatively with the appropriate z-index.
The afftected users are on OSX but I don't have users on other platform for now, and since I don't have consistent way to reproduce, i could not verify on other platforms.

The applicationMenu has a copy item of this kind:

 {
        label: 'Copy',
        accelerator: 'Command+C',
        role: 'copy'
}

and the contextual menu:

{
      id: 'copy',
      label: 'Copy',
      role: 'copy'
}

Update: I previously used selector for menu item declaration. I fixed this, but the problem remains.
Update (5/26): Same behavior on 1.7.1.

@rebornix
Copy link

@alexstrat are you using English keyboard layout or others?

@alexstrat
Copy link
Contributor Author

I'm using a U.S. keyboard, some of my users are using French keyboard. I have not noticed that keyboard layout makes a deterministic difference.

@tborychowski
Copy link

tborychowski commented May 18, 2017

I have the same issue (macos, latest electron beta).
"Copy" (using keyboard shortcut) randomly stops working.
I have one webview with a web-app loaded and need to copy the text from that app.

@alexstrat
Copy link
Contributor Author

@tborychowski
Copy link

@alexstrat, yes it is 😄

@dewyze
Copy link

dewyze commented May 26, 2017

I recently updated to Sierra, and once I tried my electron app after that, copy and paste stopped working entirely. I have the menus correctly set up. I am not sure if it is related to this, but I am seeing similar behavior and all other issues I can find reference needing to set up the menus (which I have set up correctly).

@dewyze
Copy link

dewyze commented May 26, 2017

Okay, my issue was related to kicking off the npm start inside a tmux on a mac. Running that outside of a tmux solves my problem. Sorry for the distraction.

@rebornix
Copy link

@dewyze what you run into is #916 :)

@hungys
Copy link

hungys commented Jun 7, 2017

This issue also occurred on VS Code randomly, and I found that the copy/paste keyboard shortcuts were actually rebound to control+option+command+c/v (microsoft/vscode#28046), anyone found this on applications other than VS Code?

@zcbenz zcbenz added the blocked/need-info ❌ Cannot proceed without more information label Jun 20, 2017
@zcbenz
Copy link
Member

zcbenz commented Jun 20, 2017

Does this ever happen to you in Chrome browser?

@tborychowski
Copy link

It never happened to me in Chrome.

@alexstrat
Copy link
Contributor Author

Me neither

@guillaumearm
Copy link

I confirm this bug exists in Electron v2.0.2 too

@miniak
Copy link
Contributor

miniak commented May 20, 2019

Does it still reproduce in Electron >= 3? The <webview> implementation has changed in Electron 3 and it might solve these issues.

@alexstrat
Copy link
Contributor Author

I still have some reports of such bugs with Electron>=4. Though I realize now that, personally, I haven't experienced it for some time.

@sofianguy sofianguy added the 4-2-x label Aug 9, 2019
@electron-triage
Copy link

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron you reported this on has been superseded by newer releases.

If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

Thanks in advance! Your help is appreciated.

@electron-triage electron-triage added the blocked/need-info ❌ Cannot proceed without more information label Feb 19, 2020
@electron-triage
Copy link

Thank you for your issue!

We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests