Click doesn't work on Radix modal close #2506
Replies: 2 comments
-
Without an example there is nothing we can do. |
Beta Was this translation helpful? Give feedback.
-
Hi there, I know this is late, but I recently had a problem that sounds like yours. My scenario was that I had a Dropdown Menu where selecting an option would open a Dialog. That part worked, but when the Dialog was dismissed clicking would be broken on most of the rest of the UI. The solution was to ensure that the Dropdown Menu Root was explicitly closed, via its
See:
I honestly don't understand why this worked for us, but another developer left this comment in our codebase that led me to the solution: "Need to make sure other portal elements are closed before opening a new one". So, I would look around for other components that can be "opened" or "closed" and review. The only theory I have is that when clicking a DropdownMenu item Radix closes the menu but does not necessarily update any state the developer has introduced to manage "open-ness". So, if there is any disagreement about "open-ness", weird things happen. |
Beta Was this translation helpful? Give feedback.
-
HI, my radix model closes but I am not able to click on screen after the modal closes. I am using react state to render radix modal
const [isSendDocumentModalOpen, setIsSendDocumentModalOpen] = useState(false);
Open P.S: (isOpen == isSendDocumentModalOpen, setIsOpen == setIsSendDocumentModalOpen){isSendDocumentModalOpen &&
}
Here's what SendDocumentModal returns
Any help would be appreciated. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions