Profile cover photo
Profile photo
Brad Dunbar
1,236 followers
1,236 followers
About
Posts

Post has attachment
Add a comment...

Post has attachment
Had a great time in NYC, though I'm glad to be warm again. :D
Add a comment...

Post has attachment
Snow at the zoo lights!
Animated Photo
Add a comment...

Post has attachment
I love this so much!
Add a comment...

Post has attachment
Laundry!
Animated Photo
Add a comment...

Post has attachment

Post has attachment
Blocks and other fun!
PhotoPhotoPhotoPhotoPhoto
2014-06-23
5 Photos - View album
Add a comment...

Post has shared content
Touch events on the web are fundamentally unfinished and not getting better.

There are two reasons for this:

Clicks Still Exist on Mobile

In the mouse-driven web, higher-level abstractions dominate mouse handling code. The click event and :active CSS pseudo-property take care of a huge percentage of mouse-oriented use-cases.

These abstractions, for all intents and purposes, do not exist in the touch-driven web. That was excusable in 2007, but it's not excusable today.

If you haven't had the pleasure of building something to work well on a touch-driven device, imagine having to build a mouse-driven site using only mousedown, mouseup, mousenter and mouseleave.

Is it a Scroll or a Touch?

To make matters worse, touch-driven devices do not have a separate input device for scrolling. The finger scrolls and the finger points.

Remarkably, the touch-driven web does not provide abstractions for telling the difference. For most cases, you would expect the browser to handle scrolling, letting the app handle non-scroll events.

This problem makes implementing click and :active in JavaScript incredibly difficult.

Here's how it works in Cocoa:

"Because a scroll view has no scroll bars, it must know whether a touch signals an intent to scroll versus an intent to track a subview in the content. To make this determination, it temporarily intercepts a touch-down event by starting a timer and, before the timer fires, seeing if the touching finger makes any movement. If the timer fires without a significant change in position, the scroll view sends tracking events to the touched subview of the content view. If the user then drags their finger far enough before the timer elapses, the scroll view cancels any tracking in the subview and performs the scrolling itself"

Features like an :active pseudoclass can work on the touch-driven web, and have enough fine details to make them good candidates for platform support:

https://www.evernote.com/shard/s2/sh/3a903a35-7ea2-4ccd-805d-75fa5bedd58c/f098483df2727288ebbf5045f1322fe8/res/593dda9d-7996-480a-b69c-395924045d7b/How_to_Beat_Cocoa-20120915-160950.png.jpg

TL;DR

The touch-driven web platform needs native abstractions for common interactions like click and :active. It needs the platform to handle scrolling for application developers, except where they need extremely fine control. Above all, it needs touch-driven browser vendors to take the problem as seriously for web authors as Apple takes it for Cocoa developers.

#TheWebIsNotGoodEnoughYet 
Add a comment...

Post has shared content
Tools for Conference Planners: Pathable's Event Experience - See How it Works http://hub.am/1nrfZkT
Add a comment...

Post has attachment
Wait while more posts are being loaded