# Nested click event getting overwritten

**URL:** <https://forum.inductiveautomation.com/t/nested-click-event-getting-overwritten/103884>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 19, 2025, 12:56pm UTC](https://forum.inductiveautomation.com/t/nested-click-event-getting-overwritten/103884 "2025-03-19T12:56:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Breeding](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Matthew\_Breeding](https://forum.inductiveautomation.com/u/Matthew_Breeding)\
**Post date:** [March 19, 2025, 12:56pm UTC](https://forum.inductiveautomation.com/t/nested-click-event-getting-overwritten/103884/1 "2025-03-19T12:56:28Z")

</div>

Hey all, getting a bit of an issue with a onClick event.

So basically I have a navigation tree that I need to make from scratch because the native perspective one does not meet my needs. With that I have a favorite functionality on each item in the navigation tree. I need to put an onClick listener on the row of each item while also having an onClick listener on the star icon nested deeper in that item. What's happening is even if i click the star icon it is still registering as a click for the row onClick listener instead of the star onClick listener. I know its because the star listener is within the other one but i have no idea how to solve this issue. I have tried to make the z-index higher on the star icon but to no avail. Here's my structure:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/d/ed81f4b8b6bab387ceea9e76bbc0c64d6a9c89c1.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c351fcb4b1d6e4b5e72cdc504281ce47de9753b6.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [March 19, 2025, 1:15pm UTC](https://forum.inductiveautomation.com/t/nested-click-event-getting-overwritten/103884/2 "2025-03-19T13:15:37Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/401abe9a000e433d598aa327b433d8d989246d90.png)

Enable the stop propagation on the icon one

> **[Component Events and Actions | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/component-events-and-actions#shared-action-options)**
>
> In Perspective, events and actions are some of the fundamental building blocks of project functionality. Actions give you the ability to respond to specific user inputs (such as mouse, keyboard, and touch inputs), as well as broad session events...

---

<div class="post-metadata">

**Author:** ![Matthew\_Breeding](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Matthew\_Breeding](https://forum.inductiveautomation.com/u/Matthew_Breeding)\
**Post date:** [March 19, 2025, 1:20pm UTC](https://forum.inductiveautomation.com/t/nested-click-event-getting-overwritten/103884/3 "2025-03-19T13:20:01Z")

</div>

No shot it was this easy, yup selecting that option fixed all my issues in a jiffy. Thanks!
