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

Function onColorAreaUp

packages/react-aria/src/color/useColorArea.ts:326–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324 };
325
326 let onColorAreaUp = e => {
327 let id = e.pointerId ?? e.changedTouches?.[0].identifier;
328 if (isOnColorArea.current && id === currentPointer.current) {
329 isOnColorArea.current = false;
330 setValueChangedViaKeyboard(false);
331 currentPointer.current = undefined;
332 state.setDragging(false);
333 focusInput();
334
335 if (typeof PointerEvent !== 'undefined') {
336 removeGlobalListener(window, 'pointerup', onColorAreaUp, false);
337 } else {
338 removeGlobalListener(window, 'mouseup', onColorAreaUp, false);
339 removeGlobalListener(window, 'touchend', onColorAreaUp, false);
340 }
341 }
342 };
343
344 let colorAreaInteractions = isDisabled
345 ? {}

Callers

nothing calls this directly

Calls 1

setDraggingMethod · 0.65

Tested by

no test coverage detected