How to trigger only the inner clickable div in a clickable div?
If u click on the inner blue box both inner and outer onclick events getting triggered but I just want to get the blue one triggered?
.outer {
width: 100px;
height: 50px;
cursor: pointer;
background: green;
}
.inner {
width: 50px;
height: 50px;
cursor: pointer;
background: blue;
}
<div class="outer" onclick="alert('Hello world from outside');" role="button" tabIndex="-1">
<div class="inner" onclick="alert('Hello world form inside');" role="button" tabIndex="-1">
</div>
</div>
Not sure if its necessary to mention but I want to fix this issue in React using sass.