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

Fixed a bug that was causing Electron's context menu to fail #2238

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

tonyanziano
Copy link
Contributor

@tonyanziano tonyanziano commented Mar 3, 2021

The showMenuAndWaitForInput() function was returning the entire Electron.MenuItem which contains functions as part of the object (click handler, etc.).

With Electron 11, these cannot be sent over IPC back to the client side because functions cannot be serialized. This was causing the result to never make it back to the client side and for the context menu action to silently fail.

I changed the API to return an object containing solely the id property of the selected menu item because all of the consumers of this API only care about the id property anyways.

CI running here

srinaath
srinaath previously approved these changes Mar 3, 2021
corinagum
corinagum previously approved these changes Mar 3, 2021
Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tonyanziano tonyanziano dismissed stale reviews from corinagum and srinaath via 28709b6 March 4, 2021 02:28
@tonyanziano tonyanziano merged commit 16c9b03 into v4.12.0 Mar 4, 2021
@tonyanziano tonyanziano deleted the toanzian/context-menu branch March 4, 2021 02:28
tonyanziano added a commit that referenced this pull request Mar 9, 2021
* Added ability to debug shared package (redux state).

* Bumped Web Chat to 4.12.0

* Integrated inspector with new WC activity focus hook

* Updated fallback speech service ponyfill API

* Fixed WC send box overflow visual bug

* Added changelog entry

* v4.12.0 Release

* Fixed opening files via electron's dialog API (#2237)

* Fixed opening files via electron's dialog API

* Added a changelog entry.

* Fixed a bug that was causing Electron's context menu to fail (#2238)

* Updated 4.12.0 release date

* Fixed split button caret icon alignment (#2239)

* Categorized 4.12.0 changes

* Updated path to electron-builder hashFile utility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants