react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Add support for direct topMouseMove event

Open reseul opened this issue 8 years ago • 8 comments

Current implementation does have direct events like topMouseEnter and topMouseLeave. We'll have to add a direct topMouseMove, a counterpart of topTouchMove, though the latter is only generated when a button is down (in mouse parlance it's more of a mouseDrag).

Opening here for tracking.

reseul avatar Jan 12 '18 18:01 reseul

This can be considered a follow-up/tweak of https://github.com/Microsoft/react-native-windows/issues/688

reseul avatar Jan 12 '18 21:01 reseul

@reseul / note to implementer - in a standard UWP, there will be no effect on CPU usage / battery life when no listeners are subscribed to the topMouseMove event. However, if you implement it for react-native, we should do it in such a way that the native event is only subscribed when there is a JS listener, otherwise we'll be sending events over the bridge with no listener. I believe this is actually already a problem for topTouchMove.

rozele avatar Jan 17 '18 02:01 rozele

@rozele Good point, will do (and fix the others). Will see what works..

reseul avatar Jan 17 '18 02:01 reseul

@rozele It seems to be easy with direct events since "onXXXX" properties just get propagated to native view manager as boolean properties. This would cover topMouseMove. I think it's trickier when trying to address routed events since the handler may be hooked into some parent.

reseul avatar Jan 17 '18 02:01 reseul

Ok, I think I have a solution for bubbled too. When time comes.

reseul avatar Jan 17 '18 03:01 reseul

Hmm, forgot the solution for bubbled, need to think again.

reseul avatar Feb 21 '18 21:02 reseul

@reseul - did we close this one out?

rozele avatar Feb 26 '19 04:02 rozele

@rozele vintage, it's implemented and working. Closing.

reseul avatar Feb 26 '19 19:02 reseul