On 6/29/07, Joe Hewitt <joehew
...@gmail.com> wrote:
> I'm testing the bounds of JavaScript on my new iPhone and finding that
> it does not dispatch "mousemove" events, and it doesn't dispatch
> "mousedown" until you actually release your finger. This is really
> bumming me out because I was hoping to whip some some fun touch-screen
> apps over the weekend. It seems that double-clicking and dragging,
> which are the means for zooming on the page, are always triggered in
> favor of giving scripts in the page the ability to handle and override
> these events.
There are a lot of events that the iPhone doesn't pass (see my post on
"The Finger is not a Mouse"
http://groups.google.com/group/iphonewebdev/browse_thread/thread/cb37... ), and many it only simulates partly.
As I understand it clickable elements can get mousedown, mouseup,
mousemove, click events --
clickable elements include links, form, image map area, or with
elements that have elements mousedown, mouseeup, or click. Scrollable
elements such as textareas, iframes, and framesets get scroll events.
The iPhone definately doesn't support onmouseover, cut/copy/paste,
drag/drop, and of course selection.
I'm told that to allow for some types of menus that hover is
supported, but I can't verify this.
Mouseover is supported, however, the problem may be that your
mouseover handler is not inside wht the iPhone thinks is a possible
"clickable" element. You may need to experiment to figure this out. It
is possible that hover may also be a solution for you (but I've never
used it before much less on an iPhone so I'm not a lot of help on that
one).
> I'm hoping we can find a workaround, or that the Webkit team will
> announce they have added some new events for handling multi-touch
> interaction.
As far as I know there are no multi-touch events for the browser. But
who knows as the docs are not out yet.
Good luck, and let us know what you figure out ;-)
-- Christopher Allen