Responsive layout screen can be drag off the screen in preview

I did a responsive mobile app prototype and when I preview it on the web browser (used Chorome inspect to change to various phone size )the whole screen became draggable, which means I can literary drag my app page off the intractable “phone” area. Do you guys know how to prevent that happening?

Thank you!!!

try this code in the HEADER html

	<script type="text/javascript">
	document.ontouchmove = function(e){ e.preventDefault()}; 
Above is my header code. where would be better to add the code in? Sorry I do not have any coding experience.

Thank you!!!

before the </head>

The code is not working T_T