Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Palm Pre Browser - How to Prevent Scrolling?

4 views
Skip to first unread message

Garrett Smith

unread,
Sep 28, 2009, 10:01:42 PM9/28/09
to
How can I prevent the document from zooming and scrolling in Palm Pre?

Testing using the Palm Pre Emulator 1.2[1] for Windows, running the Web
Browser:
Mozilla/5.0 (webOS/1.2; U; en-US)
AppleWebKit/525.27.1 (KHTML, like Gecko)
Version/1.0 Safari/525.27.1 Desktop/1.0

The actual device, which unfortunately I do not have, is touch screen;
its "pointing device" is the user's finger. The web browser is basically
Webkit, with some extra stuff.

The emulator runs on VirtualBox and apparently translates the cursor
pointer, from my computer, to what the touchscreen would recognize as a
finger or "touch".

FWICT, there are no "touch" events in Palm Pre's browser; the finger is
treated as a mouse.

The difficulty I am having is that mousedown + mousemove (a drag) causes
the document to scroll. This is apparently some sort of default action,
as in iPhone, but in iPhone it can be prevented by preventDefault.

I've tried return false and preventDefault, but the document scrolls and
zooms. I suspect that preventing this is either not possible or that
there is another way to do it.

How can I prevent the document from zooming and scrolling in Palm Pre?
[1]http://developer.palm.com/
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq

Garrett Smith

unread,
Sep 29, 2009, 4:09:57 AM9/29/09
to
Garrett Smith wrote:
> How can I prevent the document from zooming and scrolling in Palm Pre?
>


[...]

> FWICT, there are no "touch" events in Palm Pre's browser; the finger is
> treated as a mouse.
>

I can't get "mousemove" event to fire at all in the emulator, though
the event handler property is present, and has a default value of
"null".

Reduced to adding a very simple callback to "document.onmousemove".
Clicked and dragged in the emulator.

Result: "mousemove" event does not fire.

Garrett

0 new messages