-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
- Electron version: 1.8.2
- Operating system: macOS 10.13.3
Expected behavior
It seems like you should be able to copy text in the devtools using Cmd-C regardless of whether or not the app itself has those keys assigned as menu items
Actual behavior
Cmd-C does nothing (apparently you have to add menu items to get this to work). My app as no need of Copy so those keys are not assigned and no menu is added. The normal app keys do not affect the devtools, why should Cmd-C be any different? In other words pressing Cmd-F in devtools will start a search even though my app has no menu for Cmd-F. Similarly it seems like Cmd-C should copy when devtools has the focus regardless of what my app is doing.
How to reproduce
git clone -b cmd-c-not-working https://github.com/greggman/electron-quick-start.git
cd electron-quick-start
npm install
npm start
Then try to copy something in devtools by pressing Cmd-C. Nothing happens. Notice that Cmd-F works even though there is no Cmd-F menu item and even though the app is trapping all keypresses. The point being it seems like Electron's devtools shouldn't rely on the App's setup for basic functionality. That works in Chrome because a webpage can't change the App's menus but in Electron arguably Electron's devtools should be checking for Cmd-C/Cmd-X/Cmd-V in some other way, maybe the same way it's checking for Cmd-F.