Menu: Fix that Buttons not worked as a activator content #3065
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.
Description
fixes #1583, fixes #3063.
Before this, when we click a button which as a activation, the popover didn't open, so menu didn't work.
With an investigate, i think the problem is, menu's activator content has onmouseup, but button's doesn't have, they instead of have onclick. So we may do two optional approach (both works):
(We cant simply add another onmouseup event because this time when we click a button, onclick and onmouseup both fires twice)
I think the first approach is more problematic because i am sure it's a breaking change.
So i go ahead of the second option. When we change onmouseup to onclick, right click event didn't work (probably thats why we used onmouseup in menu), so i added the oncontextmenu events to succeded a working right click.
With this change, i expected that all contents, all variants and all click types will work with menu properly after this PR.
Note: Added docs that shows that working button as activator content.
How Has This Been Tested?
Types of changes
Checklist:
dev
).