C|B sides

Subscribe

PPK in the BK on Mobile JavaScript

Comments
0
Topics

I recently had the pleasure of seeing a true Web pioneer give a talk on mobile JavaScript. A Touching Look Into The Future Known As Today brings Peter-Paul Koch (@ppk, creator of quirksmode.org) to Brooklyn to give an updated talk about his experience in the trenches testing JavaScript touch event support on various mobile devices. I'll attempt to distill it down to some key points.

Mouse events and touch events are blended on mobile

The three interaction modes, in the order of the most to least we know about them:

  1. Mouse
  2. Keyboard
  3. Touch

Event handling on the desktop is easy because the mouse and keyboard events rarely fire simultaneously. But with the advent of touch-screen devices, both touch and mouse events fire, a conscious decision to allow mobile users to browse the countless existing sites relying on mouse events for interaction.

If you want to make a distinction:

// desktop
element.onmousedown = dostuff;

// touch
element.ontouchstart = function() {
  dostuff();
  element.onmousedown = null;
};

Continue reading PPK in the BK on Mobile JavaScript


Orientation Switch in "Nano"-Sized Devices

Comments
0
Topics

iPod Nano screenshot Apple has finally fit a multitouch interface into the 6th generation iPod Nano. In order to cram that into the diminutive form factor, users give up a few features such as video recording, playback, and the orientation sensor. Dropping the sensor seems logical now; the device is so small that orientation loses its meaning, and with a 1:1 aspect ratio there's no potential for a better fit for the on-screen content. I love the new approach of actually rotating the screen with your fingers, in the event you actually need to (assuming that would be due to the way it's clipped to you). There's a great demo of multitouch on the Nano at Apple's website using the latest and greatest techniques in CSS animation (sorry, Chrome or Safari only).

This update got me thinking about the lost orientation sensor, and when it can frustrate more than delight. I purchased the last generation iPod Nano for my girlfriend. What I got back was an ethnographic study. Although she loved the build quality of the device and the fact it held all her music, it turned out to be less than ideal for her most common use — at the gym.

Continue reading Orientation Switch in "Nano"-Sized Devices