- Use
InputDeviceCapabilities.firesTouchEventsto detect mouse events from touch events InputDeviceCapabilities.pointerMovementScrolls- http://wicg.github.io/InputDeviceCapabilities/#dom-inputdevicecapabilities-pointermovementscrolls
- Let's say you have a carousel that you would swipe with a finger, but could select text with a mouse (and then use buttons to navigate). Instead of using
pointerTypeto detect that and limiting it totouchandmouse, you could check if the pointer would normally cause scrolling.
- Adding direction-specific
touch-actionvalues:up,down,left,right- https://github.com/w3c/pointerevents/issues/6
- Edge has agreed to add them, but it will take them about a year.
- Changing pointer capture from a modification of event targeting to a modification of hit testing
- Chrome team will create a branch of the spec that changes the behavior
- Would like to see implicit capture for all pointer types, but there is concern from others that implicit capture for mouse will break the web
- https://github.com/w3c/pointerevents/issues/125
- Created a Chrome extension to mimic implicit capture
- Adding events around
:activestyle- https://github.com/w3c/pointerevents/issues/124
- So you can programmatically detect if a button would still be clicked if you released the pointer, based on how much movement has occurred since pressing down
gotpointercapturewill now always be delayed until the next pointermove.gotpointercaptureandlostpointercapturewill always copy their properties from the event that caused them to be fired.- New method:
hasPointerCapture()