Question

I created a drawer using HTML5 that has position fixed with a z-index greater than what's behind it (similar to the Gmail android native app). When it is toggled(opened), and after clicking any link, it clicks what's behind it. I am using zepto touch, and "touchend" as event type. Any clue how to solve it?

Was it helpful?

Solution

Try following:

$(elem).on("touchend", function() {
    ... do your stuff ...
    document.activeElement.blur();
});

You could also try setting pointer-events: none; with CSS to elements that are behind the menu. And then set it back to "auto", when drawer is closed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top