score:1

Accepted answer
<body onload="flag=true">
  <div id="root">
    <div class="container" ontouchend="flag=false">
      <div class="content">Hello StackBlitz!</div>
      <div class="overlay">
        <span>This is overlay</span>
        <button 
          ontouchend="flag=true; event.stopPropagation()"
          onclick='if(flag) alert("clicked!")'>
            BUTTON
          </button>
      </div>
    </div>
  </div>
</body>

Related Query

More Query from same tag