stop scroll

What features do you want to be included next?

stop scroll

Postby brian33433@aol.com on Mon 08 Feb 2010, 16:44

ok going to try to explain what i mean

do you know how on normal pages, if you press the screen and move up or down quick the whole page moves and you see the gray background. is there any way to keep it fixed in place?

B.
brian33433@aol.com
iWebKit lover
iWebKit lover
 
Posts: 46
Joined: Thu 03 Dec 2009, 17:51

Re: stop scroll

Postby Christopher on Mon 08 Feb 2010, 23:16

hmmm there is a way with javascript to disable scrolling but i don't know what it exactly is. anyone remembers the ontouch thingie?
Image
User avatar
Christopher
Site Admin
Site Admin
 
Posts: 1023
Joined: Wed 10 Dec 2008, 23:01
Location: France

Re: stop scroll

Postby ares on Tue 09 Feb 2010, 10:59

I believe it is:
Code: Select all
document.addEventListener("touchmove", function(e) { e.preventDefault(); return false }, false)


But I am on my iPhone right now so I typed this from memory and may be wrong.
ares
iWebKit lover
iWebKit lover
 
Posts: 239
Joined: Tue 27 Jan 2009, 17:10

Re: stop scroll

Postby brian33433@aol.com on Tue 09 Feb 2010, 14:53

either that wasn't it or i'm doing something wrong, which wouldn't surprise me :)
i basically pasted <SCRIPT LANGUAGE="JavaScript"> document.addEventListener("touchmove", function(e) { e.preventDefault(); return false }, false) </SCRIPT> in the head but it didn't work
me and java seem to dislike each other

b.
brian33433@aol.com
iWebKit lover
iWebKit lover
 
Posts: 46
Joined: Thu 03 Dec 2009, 17:51

Re: stop scroll

Postby ares on Tue 09 Feb 2010, 16:10

I was correct in remembering the code so you must be doing something wrong.

Make sure that you add the code in the head. And when using the script tag, don't bother with language, just use type. Here is an example:

Code: Select all
<head>
<script type="text/javascript">
document.addEventListener("touchmove", function(e) { e.preventDefault(); return false }, false)
</script>
</head>


This should disable scrolling completely.

Also, java is not the same as javascript. They are completely different.
ares
iWebKit lover
iWebKit lover
 
Posts: 239
Joined: Tue 27 Jan 2009, 17:10


Return to What would you like to see next

Who is online

Users browsing this forum: No registered users and 0 guests