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

Allow retrieval of ContextMenu attached to given Component #1520

Open
mvysny opened this issue Feb 11, 2019 · 3 comments
Open

Allow retrieval of ContextMenu attached to given Component #1520

mvysny opened this issue Feb 11, 2019 · 3 comments
Labels

Comments

@mvysny
Copy link
Member

mvysny commented Feb 11, 2019

It would be great to have a means to retrieve the instance of the ContextMenu object which has previously been attached to given Component, e.g. public static ContextMenu ContextMenu.getContextMenuOf(Component) or public static MenuManager.get(Component).

The use-case is that with the Karibu-Testing library, it may be helpful to click on a particular context menu item with given caption, to test particular action.

@swebb99uk
Copy link

Yes that would be great, I've just hit that exact problem.

I have a Button which is the target of a context menu. The context menu is opened via a left click. I can find the the button but can't seem to find a way of finding conestmenu in the text.

@mvysny
Copy link
Member Author

mvysny commented Oct 14, 2019

The same thing with GridContextMenu and Grid.

@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-context-menu-flow Oct 6, 2020
@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-context-menu May 19, 2021
@vaadin-bot vaadin-bot transferred this issue from vaadin/web-components May 21, 2021
@satorstefan
Copy link

+1 Vote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants