I have a div on my website that is initially hidden using this css rule:
.menu-popup{
display:none;
border:1px solid #FFF;
padding:8px;
width:100%;
height:100vh;
position:fixed;
top:60px;
overflow:hidden;
}
When I click a button, the div is displayed, and when I click outside the div, it hides again. However, I am facing an issue where the filter function inside the div does not work when it is displayed. Strangely, if I change the display property to block for the class:
.menu-popup {
display:block;
}
then the filter function works perfectly!
Could someone please assist me in identifying what mistake I might be making? You can view the fiddle here: https://jsfiddle.net/keepitstupidsimple/dps7vagj/13/