Support Pointer events specification
What is your approach to IE10 touch events?
Hammer.js checks window.navigator.pointerEnabled || window.navigator.msPointerEnabled and then switches touchstart, touchmove, touchend touchcancel to pointerdown MSPointerDown, pointermove MSPointerMove, pointerup pointercancel MSPointerUp MSPointerCancel.
Any update on this?
Maybe we should polyfill pointer events always, like in http://blogs.msdn.com/b/eternalcoding/archive/2013/01/16/hand-js-a-polyfill-for-supporting-pointer-events-on-every-browser.aspx. Having pointer events always available seems way better than having to manage touch and ouse events by hand.
I would love if they were enabled with a polyfill by default :) Seems like a genuine barrier to creating responsive components/apps.
On Fri, Nov 22, 2013 at 8:45 AM, Ben Alpert [email protected]:
Maybe we should polyfill pointer events always, like in http://blogs.msdn.com/b/eternalcoding/archive/2013/01/16/hand-js-a-polyfill-for-supporting-pointer-events-on-every-browser.aspx. Having pointer events always available seems way better than having to manage touch and ouse events by hand.
— Reply to this email directly or view it on GitHubhttps://github.com/facebook/react/issues/499#issuecomment-29087969 .
There are issues with listening to touch events always... I forget what they are though. @zpao knows. But we should probably make this work with SimpleEventPlugin and initializeTouchEvents()
I think we can get rid of initializeTouchEvents if we attach the listeners to the elements which have handlers attached instead of at the document level.
Related: #184
+1
It would be cool to have support for pointer events, particularly regarding responsiveness in modern IE / IE mobile browsers. I hate having to add proprietary ms viewport tags / css properties to get rid of the infamous 300ms click delay, for instance.
Any update here?
@thauburger edit: there's an internal diff coming up for making onClick work without the delay.
@chenglou Doesn't work in IE10 right now though, I believe.
@chenglou @spicyj thanks for the update!
@spicyj For IE10 one can disable click delay with something like
a, input, button {
-ms-touch-action: none !important;
}
(suggested by fastclick.js)
I'm compiling a PR based on http://www.w3.org/TR/pointerevents/ and will put it up shortly.
Please allow touch-action attribute. http://www.polymer-project.org/platform/pointer-events.html
Yes yes. https://github.com/Polymer/PointerEvents ftw.
It’s the future!
Having to use mouse and touch events separately is not in keeping with the otherwise forward thinking React framework. Pointer Events are the future, what is the status of this issue?
Actually, PointerEvents and PointerGestures polyfills were deprecated recently in favor of https://github.com/Polymer/polymer-gestures https://groups.google.com/forum/#!topic/polymer-dev/ba4aDyOozm8 I believe the problem is shadow DOM which I am not using anyway.
For now, I am hapilly using PointerEvents helper component: https://gist.github.com/steida/932d5309f6012b3eeb4e
@steida We don't care about the development of Polymer though and AFAIK PointerEvents are still in the W3 HTML5 TR?
@zoomclub Shout in #1389 if you want it to happen faster :)
fwiw, PointerEvents seem to be falling out of favor with browser devs.
https://docs.google.com/document/d/1Bfcw9iR1SF2VYCXBegbqhbqWMim-ZEd7_iaQODE-RPY/