Touch events are not triggered on video tags on safari for iPhone

By : Stef

I want to prevent the scrolling on a safari web page for iphone by binding the preventDefault method on the document element of the DOM, and it works on every elements but the video tag.

document.addEventListener("touchmove", function(e){e.preventdefault();}, false);

I've tried attaching the event to the video tags, but it seems as if nothing is attached or the events are simply not triggered.

By : Stef


In my test, when ommiting the "controls" attribute of the video you can get the events....

By example....

<video src="" id="player" width="100%" height="100%" x-webkit-airplay="allow" ></video>

Then put a div in top... and it works for me....

This video can help you solving your question :)
By: admin