I want a div that overlay all page and I want that the div captures all events (in particular touch) then if a button is in the page the button must not be clickable. I tried with:
background = document.createElement('div');
                background.style = `
                display:block;
                width:100%;
                height:100vh;
                position:fixed;
                top:0px;
                left:0px;
                z-index:9;
                background-color:black;
                opacity:0.3;`;
                document.body.appendChild(background);
and then
background.addEventListener('touchend', (e)=>{e.stopPropagation();}, true);
but it doesn't work. My page is in a cordova project.
Ok I've fixed, the problem was that in other portion of code I deleted the div before the div could manage the events.
 
     
    