Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way of disabling panning on tablets - website?

I have setup the following css to stop middle mouse panning on computers:

overflow-y: scroll;
overflow-x: hidden;

However, I can still pan around on my tablet by flicking my finger on the screen... is there a way of disabling this as well?

Thanks.

like image 536
user2538833 Avatar asked Sep 04 '13 15:09

user2538833


1 Answers

Add this to your head

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

This stops the user from being able to pinch and zoom so should resolve your issue. Please use with caution though, not everybody likes having this functionality disabled!

like image 143
Matt Saunders Avatar answered Nov 10 '22 13:11

Matt Saunders