You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you set a context menu, you can't remove it. You can change it to another menu (including an "empty" menu).
Once you set a context menu, you also lose the ability to receive click... events. When you set it to an "empty" menu, those events are still not received, implying that the "empty" menu is not equivalent to the initial state ("no menu"), where you can receive the click... events.
@codebytere With the fix, when you pass null (or just call setContext generally), will the click, right-click and double-click events be received? That's what I meant to ask. The bug I was highlighting was that the events cease to be received once you call setContext.
Activity
codebytere commentedon Aug 19, 2018
@pjebs can you potentially attach a minimal crash repro? i can take a look at it monday :)
pjebs commentedon Aug 19, 2018
No crashes. Just unexpected behaviour.
Stated another way:
Once you set a context menu, you can't remove it. You can change it to another menu (including an "empty" menu).
Once you set a context menu, you also lose the ability to receive
click... events. When you set it to an "empty" menu, those events are still not received, implying that the "empty" menu is not equivalent to the initial state ("no menu"), where you can receive theclick... events.miniak commentedon Aug 27, 2018
@pjebs I have a fix in the attached PR. @codebytere I have a local repro.
miniak commentedon Aug 27, 2018
Minimal repro using the console in
default_apppjebs commentedon Aug 27, 2018
@miniak Thank you for the pull-request.
What does your fix do? Accept null value and still receive events?
codebytere commentedon Aug 27, 2018
@pjebs that's what i meant originally:
but then,
It did crash, as you said yourself, but it was unclear what issue you were specifically seeking a fix for.
pjebs commentedon Aug 27, 2018
@codebytere With the fix, when you pass null (or just call
setContextgenerally), will theclick,right-clickanddouble-clickevents be received? That's what I meant to ask. The bug I was highlighting was that the events cease to be received once you callsetContext.pjebs commentedon Aug 28, 2018
I'm using
"electron": "^2.0.8". Is the fix applied for this version because the bug is still there.