fix upper most context menu item sometimes not clickable in electron #14401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
In electron when the context menu overlaps the center of the top window toolbar as seen here
The overlapping element is not clickable.
This PR fixes this issue similar to how vscode seems to fix it, by not allowing the context menu to overlap the window toolbar.
How to test
Open a file, open the context menu somewhere in the middle so that it would normally start at the top of the application.
The upper most entry should still be clickable and it should start below the window toolbar.
Follow-ups
Review checklist
Reminder for reviewers