# \[BUG?\] context menu on a coordinate container - Prevent Default only works for the main container

**URL:** <https://forum.inductiveautomation.com/t/bug-context-menu-on-a-coordinate-container-prevent-default-only-works-for-the-main-container/70384>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [February 27, 2023, 7:32pm UTC](https://forum.inductiveautomation.com/t/bug-context-menu-on-a-coordinate-container-prevent-default-only-works-for-the-main-container/70384 "2023-02-27T19:32:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 27, 2023, 7:32pm UTC](https://forum.inductiveautomation.com/t/bug-context-menu-on-a-coordinate-container-prevent-default-only-works-for-the-main-container/70384/1 "2023-02-27T19:32:17Z")

</div>

**Ignition 8.1.25**

I try to add a **context menu on a coordinate container** with some other component inside it.  
I would like to trigger the context menu on **left or right mouse click** on the container and on all the components inside it.

I use an **onClick event** with

```auto
self.requestContextMenu()

```

with Prevent Default option checked.

For the **left mouse click** it is ok for the container and all its components.  
But for the **right mouse click** , it only works if I right click in the container but not on its components.  
In that case the chrome standard menu is displayed.

Is it a bug or did I missed something ?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 27, 2023, 11:03pm UTC](https://forum.inductiveautomation.com/t/bug-context-menu-on-a-coordinate-container-prevent-default-only-works-for-the-main-container/70384/2 "2023-02-27T23:03:01Z")

</div>

`requestContextMenu()` is not an available component method. There is no scripting around the Context Menu at this time - it is completely driven by the properties of the component.

Additionally, we just recently (today) identified an issue where context clicks are not propagating from components to their ancestor containers. We hope to have a fix in soon - ideally before the 8.1.26 RC next week.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [February 28, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/bug-context-menu-on-a-coordinate-container-prevent-default-only-works-for-the-main-container/70384/3 "2023-02-28T15:17:42Z")

</div>

Thanks, I stay tuned to test this fix.  
In my use case, the contextMenu will be enabled only on the main coordinate container in order to be displayed when the user clic in the container or in all the components inside the container.
