Closed AnnaYuS closed 1 year ago
Hi @AnnaYuS
Now released v0.9.1 fixed this bug, although fixes the element position, the use of unmount
will make the transition unable to work properly because I cannot operate inside the components of the Headless UI. Unless you have special needs, it is not recommended to use unmount
. If you really need it, it is recommended to use static
to customize, or give up using Headless UI Float and use CSS for positioning. 😅
Hi @ycs77
Many thanks for this 👍. In my case i used the unmount=false
so that i could open a dialog from a popover. Otherwise the popover loses focus when the dialog opens and then unmounts, also unmounting the dialog. Perhaps this isn't the right use case for unmount? Is there a better way to allow a dialog to open from a popover?
Hi @yakobe, you can use the focus
attribute of <PopoverPanel>
to automatically focus the <input>
inside it when opened. (Cannot use :unmount="false") reference: https://headlessui.com/vue/popover#popover-panel
If you have other questions, please open a new issue.
Use Version Use version when bugs appear:
@floating-ui/core
: v1.0.0@floating-ui/dom
: v1.0.0Describe the bug When
unmount="false"
prop is added to headless ui PopoverPanel, the position of the floating element doesn't updateTo Reproduce https://stackblitz.com/edit/github-vfx4en?file=src/components/ExamplePopover.vue