Repository navigation
Add and document menu events - #11754
Merged
Merged
Conversation
| } | ||
|
|
||
| Menu::~Menu() { | ||
| if (model_) { |
Contributor
There was a problem hiding this comment.
Why do you need this check? Can the model_ be destroyed before the Menu destructor is called?
Member
Author
There was a problem hiding this comment.
yes, exactly; model_ can be destroyed before attempting to RemoveObserver(this), which would cause a crash, so the check is needed
|
|
||
| * `event` Event | ||
|
|
||
| Emitted when a popup is close either manually or with `menu.closePopup()` |
Contributor
There was a problem hiding this comment.
<nitpicking>
– is closed maybe?
– a full stop at the end of the sentence? )
<\nitpicking>
| }) | ||
|
|
||
| it('should emit menu-will-show event', (done) => { | ||
| menu.on('menu-will-show', () => { done() }) |
Contributor
There was a problem hiding this comment.
The docs say that it should work on Mac only, but the tests passed on all platforms. How is that? )
Member
Author
There was a problem hiding this comment.
oh oops i copied that incorrectly
alexeykuzmin
approved these changes
Jan 29, 2018
MarshallOfSound
approved these changes
Jan 29, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #8999 by adding event emission for
menu-will-showandmenu-will-close.To-Do:
/cc @MarshallOfSound