title: Event for click outside a div or element to close it on Blazor
body: <p>In my <code>Blazor</code> <code>server-side</code> project, I need to close a pop-up menu by clicking outside the menu.
  I use a simple <code>If</code> statement to show/hide the pop-up by triggering the <code>onClick</code> event. but there is no such event to close the pop-up by clicking outside the pop-up menu. so the user should only close it by click on the element with the <code>onClick</code> event.
  so my question is how we can resolve this issue better without using <code>JS</code>?</p>
  
  <p>Thank you in advance.</p>