react icon indicating copy to clipboard operation
react copied to clipboard

Support Pointer events specification

Open plievone opened this issue 13 years ago • 40 comments

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.

plievone avatar Nov 09 '13 11:11 plievone

Any update on this?

shauntrennery avatar Nov 22 '13 12:11 shauntrennery

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.

sophiebits avatar Nov 22 '13 16:11 sophiebits

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 .

jessep avatar Nov 23 '13 00:11 jessep

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()

petehunt avatar Nov 23 '13 00:11 petehunt

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.

sophiebits avatar Nov 23 '13 03:11 sophiebits

Related: #184

plievone avatar Jan 02 '14 00:01 plievone

+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 avatar Feb 05 '14 20:02 thauburger

@thauburger edit: there's an internal diff coming up for making onClick work without the delay.

chenglou avatar Feb 14 '14 18:02 chenglou

@chenglou Doesn't work in IE10 right now though, I believe.

sophiebits avatar Feb 14 '14 19:02 sophiebits

@chenglou @spicyj thanks for the update!

thauburger avatar Feb 15 '14 18:02 thauburger

@spicyj For IE10 one can disable click delay with something like

a, input, button {
    -ms-touch-action: none !important;
}

(suggested by fastclick.js)

plievone avatar Feb 15 '14 23:02 plievone

I'm compiling a PR based on http://www.w3.org/TR/pointerevents/ and will put it up shortly.

syranide avatar Apr 09 '14 20:04 syranide

Please allow touch-action attribute. http://www.polymer-project.org/platform/pointer-events.html

steida avatar May 29 '14 01:05 steida

Yes yes. https://github.com/Polymer/PointerEvents ftw.

It’s the future!

iamdustan avatar Jul 01 '14 02:07 iamdustan

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?

zoomclub avatar Aug 12 '14 06:08 zoomclub

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.

steida avatar Aug 12 '14 12:08 steida

For now, I am hapilly using PointerEvents helper component: https://gist.github.com/steida/932d5309f6012b3eeb4e

steida avatar Aug 12 '14 12:08 steida

@steida We don't care about the development of Polymer though and AFAIK PointerEvents are still in the W3 HTML5 TR?

syranide avatar Aug 12 '14 12:08 syranide

@zoomclub Shout in #1389 if you want it to happen faster :)

syranide avatar Aug 12 '14 12:08 syranide

fwiw, PointerEvents seem to be falling out of favor with browser devs.

https://docs.google.com/document/d/1Bfcw9iR1SF2VYCXBegbqhbqWMim-ZEd7_iaQODE-RPY/

iamdustan avatar Aug 12 '14 13:08 iamdustan