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

Function onTrackUp

packages/react-aria/src/color/useColorWheel.ts:206–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 };
205
206 let onTrackUp = e => {
207 let id = e.pointerId ?? e.changedTouches?.[0].identifier;
208 if (isOnTrack.current && id === currentPointer.current) {
209 isOnTrack.current = false;
210 currentPointer.current = undefined;
211 state.setDragging(false);
212 focusInput();
213
214 if (typeof PointerEvent !== 'undefined') {
215 removeGlobalListener(window, 'pointerup', onTrackUp, false);
216 } else {
217 removeGlobalListener(window, 'mouseup', onTrackUp, false);
218 removeGlobalListener(window, 'touchend', onTrackUp, false);
219 }
220 }
221 };
222
223 let trackInteractions = isDisabled
224 ? {}

Callers

nothing calls this directly

Calls 1

setDraggingMethod · 0.65

Tested by

no test coverage detected