Next.js Discord

Discord Forum

when using popover with dialog the focus is messed up

Unanswered
Artimum posted this in #help-forum
Open in Discord
hi.....
i'm using shadcn and i have a phone number input that i found on the internet [here btw](https://shadcn-phone-input.vercel.app/#setup)
so when i try to select a country it doesn't work..... i tried using offset and forcemount on the popover but still it didn't work
i even copied the example from the original creator for the dialog case and i had the same issue

8 Replies

it looks something like this but the search is not working
i tried it without the dialog and it works
there is no way around it
i solved it by recreating the popover element
Boerboel
if your referring about it not being able to click when the popup is opened
Set the dialog modal prop to true on the Popover root.
something like this
<Dialog modal={true}></Dialog>
lmk how it goes
then you should be able to move the popover