Disable page drag on a mobile device

Asked

Viewed 73 times

3

I’m developing a page where we have a <input type="range" min="1" max="10" value="5">. Whenever I have to drag this input, If I miss the finger, I end up unintentionally dragging the full page. It goes to the side and back.

You can deactivate that Drag page?

  • Phellipe, is this what you’re looking for? http://stackoverflow.com/a/8782202/2256325

  • probably not tested yet. So test put the results.

  • 1

    @Did Phellipelins solve it? Post an answer to what you did to help other people in the future.

  • I couldn’t. I gave up until someone came to understand and answer. I’m very busy, with no time to look for the answer.

  • Wasn’t the answer helpful? explain your problem better so I can help you.

1 answer

-1

This is done at OS level, follow the link for you to check.

http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review

But there is an interesting solution that is:

As soon as you enter your page you can set the history for yourself.

Example:

document.location.hash = "http://www.meusite.com.br/";

can make a test using:

window.history.back()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.