Rendering works fine, but navigation doesn't. The iPhone doesn't seem to give mouse move DOM events to elements, focused or not, so no matter how you drag in the browser window, you can't capture the mouse drag/move event before the iPhone Safari handles it. Bummer. I tried Chronoscope, Dojo Toolkit, GWT demos, Google Maps (maps.google.com), all have the same issues with mouse dragging.
Update: Here's code go enable mousemove events on iPhone
function init() {
var drag = document.getElementById("drag");
drag.addEventListener("mousemove", moveme, true);
drag.addEventListener("click", function(evt)
{ evt.preventDefault(); }, false);
}
<span id="drag" style="-khtml-user-drag:element;">Drag Me</span>
I don't know if the style attribute is needed, this is just what I was able to get working. The mousemove event appears, but only as a result of a click, not a drag.
-Ray
2 comments:
I shot a really cool video of the San Francisco Apple store iPhone launch today, check it out:
http://www.youtube.com/watch?v=yraMy-OSf4Y
Mike
Post a Comment