4 ms·
The unifying nature of pointer events is what makes them so important for the future. Otherwise you have to implement multiple pointer models on a device that p
by dmethvin 12y ago
The unifying nature of pointer events is what makes them so important for the future. Otherwise you have to implement multiple pointer models on a device that provides more than one, or try to simulate one from the other which becomes a mess of lies that the app developer has to sort through.
I've already worked with a couple of companies that have been bitten by assuming a device has either touch or mouse, but not both. They had code to the effect of `if ( touchstart in document ) { attach touch events } else { attach mouse events }` but then they ran into Chrome on a Windows 8 system with a touch screen. Whoops. Now their site only works if you touch the screen.
If you think this is "only a problem on those crazy Windows 8 notebooks" then you're not thinking ahead to systems that will use a Kinect, eye tracking, or some other advanced technique to implement pointers. Devs are really going to hate it when those interesting input methods are sliced and diced into mouse or touch (or God forbid BOTH) in order to shove it into Apple's 2007 vision of a web page input world.
- randomfool 12y agoThere is already the need to support alternate input mechanisms in the form of accessibility and keyboard navigation. Creating UI widgets that work well everywhere is a non-trivial task that is frequently underestimated. What this really highlights is the need for high quality UI toolkits which abstracts these details. If a developer is complaining about supporting mouse and touch, then they're most likely missing out on many more details and should be using some pre-built components instead.
- cbr 12y ago> If you think this is "only a problem on those crazy Windows 8 notebooks"... Many Chromebooks also have touchscreens.