If that doesn't work a solution could be to put an invisible div
exactly over the textarea (use absolute position and z-index). You can
then add a click event to the covering div that gives the focus back
to the textarea.

<div id="container">
<div id="cover" onmouseup="document.getElementById('text').focus();"
style="background:transparent"></div>
<textarea id="text"></textarea>
</div>

You will also need to check if the user moved her finger outside of
the #cover before giving the focus to the textarea.

Another solution could be not to show the textarea at all, and make it
appear only when a button/image/element is pressed. When the user
finished typing, you set a label with the textarea value and hide the
textarea element again. It's sure a lot of work for a simple task...
but if need to completely prevent scrolling...

On Jan 8, 12:56 pm, Andi <[email protected]> wrote:
> > Adding the e.preventDefault(); to ontouchmove of the textarea should
>
> work.
>
> Sadly, it does not. I already tried this.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to