James Vickers
James Vickers

Reputation: 811

Disabling scrolling on iPad in a home screen application

I want to disable scrolling in an iPad HTML page, but it does not work when the page is launched from the home screen.

I have disabled scrolling in Safari running normally. However, when I run the page from the Home Screen, it scrolls vertically, with the bounce effect. I am currently using:

$(document).bind('touchmove', function(e) {
    e.preventDefault();
});

Upvotes: 2

Views: 498

Answers (1)

Tobs.Core
Tobs.Core

Reputation: 713

You should use touchstart instead of touchmove. This should fix the problem. The reason for this is, that no events are fired during the pan, so the touchmove event is fired too late.

Upvotes: 3

Related Questions