Have you started 'hacking' on the iPhone yet? We are pushing on the development pretty hard in preparation for iPhoneDevCamp next week. The ajaxian folks have compiled several 'notes and quirks' with regard to development on the iPhone:
- Poking around the DOM, I don't see any special objects, with the possible exception of window.offscreenBuffering (set to true).
- Bookmarklets work, although you have to go through the bookmarks menu to get to them.
- Safari crashes are handled gracefully - the main screen fades back in, and you can jump right back into Safari. It will then load page you were visiting when it crashed.
- Drag and drop, and other behaviors based on picking up mousemove events, don't work. CSS-based element drag and drop doesn't work either. Dragging one finger around the iPhone's version of Safari causes the window to scroll, and that's it. I assume that scroll events do work. I'm sure somebody is already working on a version of drag and drop based on window scrolling.
- For documents with no width set, the iPhone uses a default width of 980px.
- You do not get "mousedown" when you touch the screen. You get "mousedown" and "mouseup" at the same time when you release your finger. The "mousemove" event does not seem to fire at all. There is no way to handle double-clicking because that is the action for zooming, and calling event.preventDefault() doesn't seem to override that.
link to original post