ycs77 / headlessui-float

Easily use Headless UI with Floating UI to position floating elements.
https://headlessui-float.vercel.app
MIT License
344 stars 11 forks source link

Cannot read properties of undefined (reading 'body') #32

Closed jeffreyvanhees closed 1 year ago

jeffreyvanhees commented 1 year ago

Use Version

"vite": "^3.1.0",
"@headlessui-float/vue": "^0.10.0",
"@headlessui/vue": "^1.7.4",
"vue": "^3.2.45"

Describe the bug Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'body') occurs in getNearestOverflowAncestor() when opening Listbox.

To Reproduce See: https://stackblitz.com/edit/github-vfx4en-okqi6n?file=src%2Fcomponents%2FExampleListbox.vue to reproduce (open listbox and view console)

Frankaus commented 1 year ago

Hi there, I have this bug as well and was about to open the same issue. Did you already resolve it? Thank you.

Frankaus commented 1 year ago

By removing floating-as="template" the error disappears but there is no styles being applied

jeffreyvanhees commented 1 year ago

Hi there, I have this bug as well and was about to open the same issue. Did you already resolve it? Thank you.

No, no solution yet unfortunately. Removing floating-as is not really an option for me as I need the styles beging applied to.

ycs77 commented 1 year ago

Fixed on v0.10.1