MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onPointerUp

Function onPointerUp

packages/react-aria/src/interactions/useMove.ts:205–215  ·  view source on GitHub ↗
(e: PointerEvent)

Source from the content-addressed store, hash-verified

203 };
204
205 let onPointerUp = (e: PointerEvent) => {
206 if (e.pointerId === state.current.id) {
207 let pointerType = (e.pointerType || 'mouse') as PointerType;
208 endEvent(e, pointerType);
209 state.current.id = null;
210 let ownerWindow = getOwnerWindow(getEventTarget(e));
211 removeGlobalListener(ownerWindow, 'pointermove', onPointerMove, false);
212 removeGlobalListener(ownerWindow, 'pointerup', onPointerUp, false);
213 removeGlobalListener(ownerWindow, 'pointercancel', onPointerUp, false);
214 }
215 };
216
217 moveProps.onPointerDown = (e: React.PointerEvent) => {
218 if (e.button === 0 && state.current.id == null) {

Callers

nothing calls this directly

Calls 2

getOwnerWindowFunction · 0.90
getEventTargetFunction · 0.90

Tested by

no test coverage detected