I have developed the onclick functionality which performs specific operation regardless of clicks of tags, it seems like when I click on child tag or child click event fires its relevant parent click event automatically fired.
Need to prevent the event or handle event related to a specific tag is clicked.
What I want is when parent tag is clicked then only parent onclick function should fire, in case of child tag is clicked then only a child's onclick event should be fired.
The same functionality developed using the react app(reactjs) but the result is the same, can not able to handle the onclick event separately.
<div onClick="console.log('div tag click event fired')">
<h1 onClick="console.log('h1 tag click event fired')">This is a Heading</h1>
<p onClick="console.log('p tag click event fired')">This is a paragraph.</p>
<div>