Here is my code:
<div class="MediaPreview" style="left: 10px; bottom: 10px;">
<span>Image or video, required</span>
You need to use
e.stopPropagation() to stop the event from bubbling up to the parent.
If you show us your actual code, we can show you where to plug in
e.stopPropagation() in your click handler. Please remember that questions about code should always include the relevant code.