I have a transparent div that covers the entirety of my page that ISN'T my pop-up sidebar. I want a click anywhere on the page that's not the sidebar to close the sidebar but I also want it to do whatever it would have done if the sidebar isn't on (so, if I click on a button I want that to register).
I realize I can do this if the rest of the page are children of the transparent div, then clicking will trigger the listeners of both the parent and the children, but I can't use that layout because it causes issues with the positioning of my sticky nav bar. The transparent "cancel" div is a standalone div with no children, but I still want the click to propagate through it somehow.
Rough outline of my code element hierarchy:
<body>
<sidebar/>
<cancelDiv/>
<otherContent/>
</body>
So, to reiterate, I want a click on cancelDiv to trigger the event listener that will close sidebar but also pass through to otherContent and do whatever the listeners there want to do.