Intent to Implement: Pointer Events in Chrome
groups.google.com
groups.google.com
The situation with Safari is a worrying echo of Internet Explorer's heyday, with an important player dragging their heels when it comes to implementing standards.
I'll be curious as to how this plays out. Safari, even on mobile, isn't anywhere near as close to the sort of dominance IE had at its peak, so I'd hope pressure over standards will eventually force Apple to capitulate.
What "stupefying bugs" exist in Safari that aren't much more simply explained by Apple being something of a laggard when it comes to implementing web standards?
That's just from the last few weeks. Can't imagine anyone who has built a moderately sized web app would think Safari's biggest problem is just being a little slow on the uptake.
In better news, wkwebview is a big improvement. Hopefully it's a sign of things to come.
https://github.com/jquery/sizzle/issues/290
https://github.com/jashkenas/underscore/issues/2081
https://github.com/jquery/jquery/issues/2145
Webkit devs are aware of these and they have been fixed in Webkit core, but Apple doesn't provide any info about when the fixes may see the light of day.
Which is my complaint. We only just got WebGL, still no UserMedia, Fullscreen APIs. It's disappointing to say the least.
To work around this, you'll have to use a library like FastClick (which is not perfect) or write some Javascript to hijack touch events.
I've also run into a number of CSS animation issues which are just bizzare. For example, "position: fixed" doesn't apply when a CSS transform is also applied to an element.
> Chrome 32+ on Android with width=device-width in the viewport meta tag doesn't have a 300ms delay, therefore listeners aren't attached.
[1]: https://github.com/ftlabs/fastclick#when-it-isnt-needed Android Firefox ref: https://bugzilla.mozilla.org/show_bug.cgi?id=941995
https://lists.webkit.org/pipermail/webkit-dev/2012-December/...
In fact, Apple worked to hinder the standardization and implementation of Touch Events, by applying for patents on the API and refusing to license them under the W3C patent policy. So it's a bit rich for Apple to criticize other browsers for not implementing an API that Apple was trying to keep proprietary. (Or to chastise other vendors about compatibility when they won't even participate in the relevant standards groups.)
Sure. From the TE-PAG report, Apple expressly excluded its Touch Events patent claims from the W3C patent policy:
Patent Advisory Groups are formed when patent claims are asserted
against or expressly excluded from royalty-free implementations of W3C
Recommendations. That happened here when Apple excluded certain of its
patents and patent applications for the Touch Events Specification.
Source: http://www.w3.org/2012/te-pag/pagreport.html> W3C then abandoned the recommendation process at that time without pursuing patent licensing discussions of any kind with Apple.
Not true. After five months of work, the PAG officially recommended in July 2012 that the Working Group continue developing the Touch Events spec, which it did for over a year before publishing Touch Events as a W3C Recommendation in October 2013: http://w3.org/TR/touch-events/
The PAG repeatedly invited Apple to meetings and requested other information from them; Apple never replied to any of our communications. This is recorded in the document above, as well as the PAG meeting minutes.
Disclosure: I am co-editor of the W3C Touch Events spec, and a member of the Touch Events Patent Advisory Group.
And also note that the posting on the webkit list is from 2012.
http://blogs.msdn.com/b/ie/archive/2014/07/31/the-mobile-web...
The latest IE "tech preview" release supports Touch Events on all platforms, and so do Project Spartan preview builds.
a) through mouse emulation, or
b) with a barely maintained proprietary plugin from Wacom that only worked in JS, at a time when most rich apps were in Flash.
Pressure and tilt on the web will enable a new class of applications that progressively enhance on hardware that's barely been an afterthought until now.
And he conveniently forgets about devices like the Yoga.
That said, they'll probably have to get on board anyway.
Why wouldn't a concept of "event inheritence" be valuable here? Pointer events could be both touch or click events; and the consumer can chose due to the type specified which they want to fire on.
I understand this isn't the model that events have been built under in web proper, but if I'm grokking the conflict here (there's a large chance I'm missing some key point, even reading the spec took some hand waving to put it together in my head) it's largely constrained by the inflexibility of what an event is.
(I'd be very curious for any sort of "why I'm wrong" or "why this isn't feasible/desirable")
But for compatibility reasons, we can't make arbitrary changes to legacy APIs. So rather than, say, change MouseEvent to be a subtype of PointerEvent, we have to do the reverse and have PointerEvent extend MouseEvent.
If they want to do that, then they're going to have lots of compatibility problems doing it with Touch Events. Too much code out there expects the presence of Touch Events to mean a touch-only device. So if you enable TE on a laptop, suddenly sites stop working for mouse/track. :-( Pointer Events don't have this problem.
While it makes sense to have a consistent API, for the foreseeable future there will be three event standards; touch, pointer, and mouse. While if there was focus on an existing standard it would leave web developers with a smaller room for error. A direct result of Blink using the Pointer Event standard is that there will be more web bloat such as jQuery wrappers to abstract interaction.
Most web developers like have experienced the mess of getting touch events and mouse events feeling consistent across different devices and browsers. Throwing more hardware and an extra API into the mix is only going to make things worse.
I welcome the much needed pressure support, for the average web developer and user the result will likely be detrimental. Colour me cynical, each browser has to nail its implementation or we're going to see another messy standard. IE for example still does not support Touch Events, even on WP. This makes front end development painful if you support the device.
First, the 'jQuery bloat' you're worried about looked like it was going to happen without Chrome native support: http://blog.jquery.com/2015/02/24/getting-on-point/. One of our goals in revisiting the decision was to avoid frameworks like jQuery having to include such polyfills to Chrome users.
The other thing is that we shouldn't assume Chrome doing Pointer Events means we won't also improve Touch Events. That's a complicated decision influenced in large part by participation by other browser vendors in the standards process around Touch Events.
Yes they do. However, IE11 doesn't support Touch Events on desktop because there is already too much code out there that makes stupid assumptions about Touch Events implying a tablet or phone without a mouse. http://blogs.msdn.com/b/ie/archive/2014/09/05/making-the-web...
I'm unaware that they released a desktop version where they enabled it, I'll have to look into it.
For the desktop version, see my recent blog post: http://blogs.msdn.com/b/ie/archive/2015/02/24/pointer-events...