tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.81k stars 1.07k forks source link

Fix hanging tests when using `anchor` prop #3357

Closed RobinMalfait closed 2 months ago

RobinMalfait commented 3 months ago

This PR fixes an issue where your tests could hang (due to an infinite loop) when testing components using the anchor prop in a JSDOM based environment.

The issue that we were causing an infinite loop because some computation ended up resulting in NaN. There is also a very elegant purely CSS based solution (using round()) to the underlying problem, but it just got support in Chrome, so for now we will just fix the issue.

Fixes: #3339 Fixes: #3294

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 0:54am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 0:54am