diff --git a/.yarn/versions/658485e8.yml b/.yarn/versions/658485e8.yml new file mode 100644 index 0000000000..79e66b2298 --- /dev/null +++ b/.yarn/versions/658485e8.yml @@ -0,0 +1,12 @@ +releases: + "@radix-ui/react-alert-dialog": patch + "@radix-ui/react-context-menu": patch + "@radix-ui/react-dialog": patch + "@radix-ui/react-dismissable-layer": patch + "@radix-ui/react-dropdown-menu": patch + "@radix-ui/react-menu": patch + "@radix-ui/react-popover": patch + "@radix-ui/react-use-body-pointer-events": patch + +declined: + - primitives diff --git a/packages/react/use-body-pointer-events/src/useBodyPointerEvents.tsx b/packages/react/use-body-pointer-events/src/useBodyPointerEvents.tsx index ca17660197..198cdcfff1 100644 --- a/packages/react/use-body-pointer-events/src/useBodyPointerEvents.tsx +++ b/packages/react/use-body-pointer-events/src/useBodyPointerEvents.tsx @@ -33,6 +33,7 @@ function useBodyPointerEvents({ disabled }: { disabled: boolean }) { } function resetPointerEvents() { + changeCount--; if (changeCount === 0) { document.body.style.pointerEvents = originalBodyPointerEvents; } @@ -42,7 +43,6 @@ function useBodyPointerEvents({ disabled }: { disabled: boolean }) { changeCount++; return () => { - changeCount--; if (isTouchOrPenPressedRef.current) { /** * We force pointer-events to remain disabled until `click` fires on touch devices