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

Function onUpTrack

packages/react-aria/src/slider/useSlider.ts:183–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 };
182
183 let onUpTrack = e => {
184 let id = e.pointerId ?? e.changedTouches?.[0].identifier;
185 if (id === currentPointer.current) {
186 if (realTimeTrackDraggingIndex.current != null) {
187 state.setThumbDragging(realTimeTrackDraggingIndex.current, false);
188 realTimeTrackDraggingIndex.current = null;
189 }
190
191 removeGlobalListener(window, 'mouseup', onUpTrack, false);
192 removeGlobalListener(window, 'touchend', onUpTrack, false);
193 removeGlobalListener(window, 'pointerup', onUpTrack, false);
194 }
195 };
196
197 if ('htmlFor' in labelProps && labelProps.htmlFor) {
198 // Ideally the `for` attribute should point to the first thumb, but VoiceOver on iOS

Callers

nothing calls this directly

Calls 1

setThumbDraggingMethod · 0.80

Tested by

no test coverage detected