Closed Hagendorn closed 1 month ago
I got this issue also. When the modal
props set to be false
, It will be able to hover the scrollbar. But when scrollbar clicked, It will close the modal.
https://codesandbox.io/p/github/firhanram/try-ark-ui/master?import=true
@Hagendorn
Hi Christian – great to see you here! Hope you're doing well :)
Regarding the issue, I see where you're coming from. There are a couple of ways to approach this. The first option that comes to mind is to completely disable this behavior:
<Dialog.Root closeOnInteractOutside={false} />
Another solution could be shifting the scroll behavior into the dialog content itself, so the dialog remains static while you scroll within the dialog.
Let me know if that would work for you.
I just pushed a fix for this in Zag.js. We'll release an update shortly.
If the issue persists after upgrading, I'll re-open it.
Thanks @firhanram and @cschroeter for your support and @segunadebayo for providing a fix so quickly!
@cschroeter thanks I am fine. I hope you are well too! Let me know if I can support
Description
When I click the scrollbar from the document to scroll down the view port, the dialog gets automatically closed. I expect that the dialog stays open and the view port gets scrolled
Link to Reproduction (or Detailed Explanation)
https://codesandbox.io/p/devbox/dreamy-joliot-tgsnnc
Steps to Reproduce
Ark UI Version
4.0.0
Framework
Browser
Google Chrome
Additional Information
No response