Context-menu on nested elements
-
Hi,
I want to have different context menus based on what the user clicked on in a hierarchy of elements.
More precisely, I need a context menu for individual elements and for the background / the container (it’s for a file-explorer).In Quasar 0.17 I did it like this: https://jsfiddle.net/Lwz8pj34/3/
It works as expected: When I right-click on the container, the parent context menu opens, and when I right-click on the child element, the child context menu shows instead.But after my v1 upgrade, this doesn’t work anymore, see: https://jsfiddle.net/e71dfcxL/ (version: 1.1.6)
The parent context menu is always opening regardless on which element I click.Am I doing something wrong?
Or is this maybe a bug? -
I noticed that actually both context menus are opening ontop of each other.
So I think this is a bug.Is there a way to stop the right-click event and the long-click event (on mobile) on the inner QMenu?
Otherwise I’ll have to work with mouse-enter events or something and disable one menu programatically and hope for a fix -
@chyde90 see @pdanpdan 's answer/codepen here https://github.com/quasarframework/quasar/issues/5135.
-
@metalsadman Awesome! This works for me. Thanks alot!
Next time I’ll check the issues, too