electron
electron copied to clipboard
[Bug]: DevTools context menu does not appear on multi-monitor
Preflight Checklist
- [X] I have read the Contributing Guidelines for this project.
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
20.1.1
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.5.1
What arch are you using?
x64
Last Known Working Electron version
20.0.3
Expected Behavior
- Run Electron App. runs.
- Open DevTools.
- Go Tabs (like Sources or Elements)
- Select some source code or DOM
- Click right mouse button
- Context menu appears
Actual Behavior
When App. runs, DevTools opens go Source tab, click right mouse button on second monitor. not first (main) monitor. then, Context menu does not appear
but, on the first (main) monitor and the internal display of the macbook pro, it appears.
Testcase Gist URL
No response
Additional Information
I'm upgrade Electron 20.0.3 to 20.1.1 a few days ago. using Vuejs-devtools 6.2.1 try to remove all of cached directory about Electron browser (likes "$HOME//Library/Application Support/my_electron_app) but does not change
Hey @keiches, thanks for reporting this. Quick question about your description:
You mention that you're using Vuejs-devtools in your app. Is that a required component for triggering the bug, or does the same bug occur for you in plain old vanilla Electron w/o any extra dependencies?
I'm also getting this bug through Electron 21.2.2, on macOS Monterey 12.4, and have been getting it in every version of macOS and Electron for the last five years, since Mojave 10.14.6 and Electron 4. I never realized the DevTools context menu would appear if it were on the same screen.
I just ran a quick test to confirm this on a Mac Pro with Monterey 12.4 and 16" MacBook Pro 2019 with Catalina 10.15.7; both are Intel Macs and both have 3 physical displays.
- Install and run a fresh copy of the minimal Electron app for testing:
$ mkdir ~/tmp $ cd ~/tmp $ git clone https://github.com/electron/electron-quick-start $ cd electron-quick-start $ npm install $ npm run start
- Open DevTools for the resulting window by selecting the
View ... Toggle Developer Tools
menu item. - Pop the DevTools window loose by going to the vertical 3-dot menu and clicking on the "Undock into separate window" icon.
- Finally, right-click anywhere in the Developer Tools window that's supposed to have a context menu (like an element in the Elements panel).
Results:
- If the Developer Tools window is on the same screen as the other window, the context menu appears like normal.
- If I drag Developer Tools to another window, the same right-click shows nothing.
- If I then drag the main window over to that screen, right-clicking will show the context menu again.
- If I then drag Developer Tools back to the first screen, leaving the main window on the other screen, no more context menu.
Interestingly, even when the context menu doesn't show up, it still acts like the menu is there; if I right-click on an element in Elements, then hit the up arrow, then hit Enter, it will do the Store as global variable
thing as if the menu was visible, and the element will be stored in a variable called temp1
.
Edited to add: The good news is, if you go to System Preferences ... Mission Control
and turn off Displays have separate Spaces
, the context menu works as expected, even if the BrowserWindow and the associated DevTools window are on separate physical screens.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.