You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Aaron Shafovaloff, Alex Baumgertner, Philipp Spiess, Esteban, Isaiah Odhner, Ryohei Ikegami, Alexey Shvaika, Stefano Sergio, Sergey Gavrilov, Alex Young and 5 more
—
Reply to this email directly or view it on GitHubhttps://github.com//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.
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.
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?
I wrote a component that allows declarative pointer event binding, and has been working for me as an easy substitute until React officially supports them.
While it's great Chrome and FF are shipping pointer events, Safari is my biggest worry. To that end, this component plays well with the official pointer events polyfill project for wide support.
Reacted by Aaron Shafovaloff, Todd Fleming, Quinn Chaffee, afilp, Dan Hart and Anton Fedchenko
If we don't provide a polyfill and just add support for it in the SimpleEventPlugin, the implementation should be relatively straight-forward, right?
This will still allow people to use the popular polyfill if they need pointer events on different platforms. React would simply handle this as another type of native events (similar to SyntheticMouseEvent and SyntheticTouchEvent). If this is something you want to implement I'd love to give it a shot 👍
@philipp-spiess Even if pointer event support is added to React, integrating with PEP will still require manually setting/removing the touch-action attribute since it's a non-standard workaround required by PEP. Supporting Safari/iOS seems fairly important and touch-action would still be a pain point.
That being said, if pointer events are added to React, I'll update Pointable so it handles touch-action and allows React to do the rest.
@MilllerTime Thank you for your input! I agree that the touch-action API is inconvenient. My idea was to simply make React understand pointer events and pool them like touch or mouse events.
Since support for Safari and iOS is vital, we could write a small guide somewhere as well where we explain how a user can set this up with the polyfill. Either by using your package or adding the touch-action property manually.
If a more out-of-the-box support for this polyfill is desired, we could also whitelist the touch-action property on HTML elements here.
Reacted by Caleb Miller, Esteban and Nicolas Dular
If anyone would like to add support it's pretty straightforward to add native events. Take a look at SimpleEventPlugin and how the other native events are supported.
There is a question about whether React should polyfill the behave for old browsers, but I think it'll be safe to start with just allowing the native events if anyone wants to give it a shot
Reacted by Pierre de la Martinière and Philipp Spiess
Activity
shauntrennery commentedon Nov 22, 2013
Any update on this?
sophiebits commentedon Nov 22, 2013
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.
jessep commentedon Nov 23, 2013
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]:
petehunt commentedon Nov 23, 2013
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
SimpleEventPluginandinitializeTouchEvents()sophiebits commentedon Nov 23, 2013
I think we can get rid of initializeTouchEvents if we attach the listeners to the elements which have handlers attached instead of at the
documentlevel.plievone commentedon Jan 2, 2014
Related: #184
thauburger commentedon Feb 5, 2014
+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
msviewport tags / css properties to get rid of the infamous 300ms click delay, for instance.Any update here?
chenglou commentedon Feb 14, 2014
@thauburger edit: there's an internal diff coming up for making onClick work without the delay.
sophiebits commentedon Feb 14, 2014
@chenglou Doesn't work in IE10 right now though, I believe.
thauburger commentedon Feb 15, 2014
@chenglou @spicyj thanks for the update!
plievone commentedon Feb 15, 2014
@spicyj For IE10 one can disable click delay with something like
(suggested by fastclick.js)
syranide commentedon Apr 9, 2014
I'm compiling a PR based on http://www.w3.org/TR/pointerevents/ and will put it up shortly.
steida commentedon May 29, 2014
Please allow touch-action attribute. http://www.polymer-project.org/platform/pointer-events.html
iamdustan commentedon Jul 1, 2014
Yes yes. https://github.com/Polymer/PointerEvents ftw.
It’s the future!
zoomclub commentedon Aug 12, 2014
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?
21 remaining items
MilllerTime commentedon Dec 13, 2016
I wrote a component that allows declarative pointer event binding, and has been working for me as an easy substitute until React officially supports them.
Update: <Pointable /> now lives in its own repo and is on npm:
https://www.npmjs.com/package/react-pointable
While it's great Chrome and FF are shipping pointer events, Safari is my biggest worry. To that end, this component plays well with the official pointer events polyfill project for wide support.
chaffeqa commentedon Jan 14, 2017
I would love to see this... the parody between
onPointerEnterandonMouseEnteris sooooo useful for user experianceanthonybarsotti commentedon Mar 16, 2017
@spicyj Is this issue still something we'd want to implement?
philipp-spiess commentedon Apr 28, 2017
If we don't provide a polyfill and just add support for it in the
SimpleEventPlugin, the implementation should be relatively straight-forward, right?This will still allow people to use the popular polyfill if they need pointer events on different platforms. React would simply handle this as another type of native events (similar to
SyntheticMouseEventandSyntheticTouchEvent). If this is something you want to implement I'd love to give it a shot 👍MilllerTime commentedon Apr 28, 2017
@philipp-spiess Even if pointer event support is added to React, integrating with PEP will still require manually setting/removing the touch-action attribute since it's a non-standard workaround required by PEP. Supporting Safari/iOS seems fairly important and
touch-actionwould still be a pain point.That being said, if pointer events are added to React, I'll update Pointable so it handles
touch-actionand allows React to do the rest.philipp-spiess commentedon Apr 28, 2017
@MilllerTime Thank you for your input! I agree that the
touch-actionAPI is inconvenient. My idea was to simply make React understand pointer events and pool them like touch or mouse events.Since support for Safari and iOS is vital, we could write a small guide somewhere as well where we explain how a user can set this up with the polyfill. Either by using your package or adding the
touch-actionproperty manually.If a more out-of-the-box support for this polyfill is desired, we could also whitelist the
touch-actionproperty on HTML elements here.caub commentedon Dec 2, 2017
so React still doesn't support
the authors don't want it or they are open to a PR?
elijahdorman commentedon Mar 13, 2018
Firefox 59 just shipped with support for pointer events enabled. There's now mainstream support for every browser except Safari.
chaffeqa commentedon Mar 13, 2018
sounds about right 🙄
jquense commentedon Mar 13, 2018
If anyone would like to add support it's pretty straightforward to add native events. Take a look at
SimpleEventPluginand how the other native events are supported.There is a question about whether React should polyfill the behave for old browsers, but I think it'll be safe to start with just allowing the native events if anyone wants to give it a shot
Support Pointer Events
Support Pointer Events