MCPcopy
hub / github.com/adobe/react-spectrum / onPointerUp

Function onPointerUp

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

Source from the content-addressed store, hash-verified

207 };
208
209 let onPointerUp = (e: PointerEvent) => {
210 if (e.pointerId === state.current.id) {
211 let pointerType = (e.pointerType || 'mouse') as PointerType;
212 // eslint-disable-next-line react-hooks/rules-of-hooks
213 endEvent(e, pointerType);
214 state.current.id = null;
215 let ownerWindow = getOwnerWindow(getEventTarget(e) as Element);
216 removeGlobalListener(ownerWindow, 'pointermove', onPointerMove, false);
217 removeGlobalListener(ownerWindow, 'pointerup', onPointerUp, false);
218 removeGlobalListener(ownerWindow, 'pointercancel', onPointerUp, false);
219 }
220 };
221
222 moveProps.onPointerDown = (e: React.PointerEvent) => {
223 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