First of all:
I am developing a web technology based iPhone application. So, this
application should behave like a native iPhone app and not like an
ordinary web site.
> That is a completely ridiculous style. Do *not* set overflow:hidden on the body.
Why not? There is no need to scroll and there never should or will be.
>> document.addEventListener("touchmove", function(e){e.preventDefault
>> ();}, false);
> Also ridiculous. Your design is botched from the start if you need to
> stoop to these sorts of things?
I don't need and I don't want rubber-band scrolling. This is a dialog
in an Application, and it never needs any scrolling and so it won't
ever need the rubber-band scrolling effect. I can't image any user who
would need or want a rubber-band scrolling effect in this case. As
this will become a phonegap-based application there is no location bar
or button bar.
> So what?
The textarea makes it possible to trigger rubber-band scrolling
unintentionally and for no good reason, so I don't want it to do that.
This was the reason for my post: Maybe someone has figured out how to
prevent this behavior.
> The problem is that you don't understand how the Web works.
I know how the web works and I would choose a different path, if i
wanted to create an iPhone optimized web site, but right now I want to
build an web technology based iPhone application, which is
indistinguishable from a native app. This may sound ridiculous to you
and maybe others, but I like to push the limits. The outcome of this
experiment may yield some interesting code snippets, e.g. I have
created a reusable slider control, which looks and behaves just like a
native slider control (which is not available in Mobile Safari). This
component may be useful for other projects, maybe even for some of
yours.
Just some thoughts
There are some reasons for developing an app with web technology:
- Not everyone knows Cocoa or wants to program in Objective C
- Using web technology makes great parts of your application are
highly portable (Mac OS X, Windows, Linux, Android, Symbian,
Blackberry)
- Maybe you already have a web based app and want to port it to the
iPhone