3 ms·
I really don't like the idea of a common pointer event. Mouse interaction and touch interaction are as different as mouse interaction and keyboard interaction.
by mozumder 11y ago
I really don't like the idea of a common pointer event.
Mouse interaction and touch interaction are as different as mouse interaction and keyboard interaction. They really do need to be treated completely differently, with different user experience models and code paths.
- jfoster 11y agoFor some applications you'll be absolutely correct, but there are also applications where they do the exact same thing. Consider the case of panning a map, for example. My understanding is that this is in addition to the existing mouse & touch APIs, so developers can just use whatever makes sense for their application.
- glandium 11y agoIt's a common interface, but you can still distinguish which of multiple devices triggered the event (with pointerId) and distinguish what type of device it was (with pointerType, which can have values "pen", "touch" or "mouse").
- pdkl95 11y agoWhat makes you think this is limited to only mouse vs touch? By design the HTML+CSS+DOM platform only provides an abstraction that may or may not have a meaningful mapping to the actual interface of the User Agent. You really shouldn't be assuming you know anything about the interface and only use pointer events in the most minimal, generic way possible. To that end, this new "pointer event" may be useful. If you want better, more detailed pointer information, you should use a platform that provides it such as writing a native app. /* the same goes for reimplementing widgets like scrollbars: don't, that's the job of the User Agent */
- mozumder 11y agoThis is dangerous, because you have to design for use model, not a generic model. If you design for a generic model, you're going to end up with a crappy interface.