1
votes

Context menu On some platforms, the draggable area will be treated as a non-client frame, so when you right click on it a system menu will pop up. To make the context menu behave correctly on all platforms you should never use a custom context menu on draggable areas.

Taken from https://github.com/electron/electron/blob/master/docs/api/frameless-window.md

Is there a way to work around this. I need to have an image dragable and able to handle both click and right click events. (Much like Facebook messenger on mobile devices).

It setting an element as dragable (-webkit-app-region: drag;) and using context menu event works as expected in mac but when using the build on windows it doesn't work.

1

1 Answers

2
votes

There is no way to have -webkit-app-region: drag; and a context menu on Windows. That's because Windows displays its own context menu for these UI items.

enter image description here

Another option is electron-drag which can simulate webkit-app-region.