Open dannylin108 opened 1 month ago
I have the same issue on Ark UI 4.1.2 for React
@narsiliko @dannylin108
We've released a new version. Please re-open the if the issue persist.
@cschroeter
We've released a new version. Please re-open the if the issue persist.
The issue remains after the latest release (v4.3.0)
https://codesandbox.io/p/sandbox/7j72xj
Touching a combobox menu item closes the dialog. Clicking on it works with no issues.
I have run into a similar issue that I think may be related. Reproduced on v4.4.3
While using a touch device (or browser emulation of a touch device), when I press a button that's inside a Dialog, and the click event for that button changes state that causes that button to no longer be rendered, I expect the dialog to remain open, but it closes.
https://codesandbox.io/p/sandbox/ark-ui-dialog-forked-6z8w67 To reproduce in the above reproduction:
I have run into a similar issue that I think may be related. Reproduced on v4.4.3
While using a touch device (or browser emulation of a touch device), when I press a button that's inside a Dialog, and the click event for that button changes state that causes that button to no longer be rendered, I expect the dialog to remain open, but it closes.
https://codesandbox.io/p/sandbox/ark-ui-dialog-forked-6z8w67 To reproduce in the above reproduction:
- Open this on a touch device or use browser emulation of a touch device.
- Press the "Open Dialog" button.
- Press the "Click to hide this button" button. The Dialog should remain open, but it gets closed.
I just did a little research and found out that when the button is unmounted, it ceases to be a child of dialog content, and from the point of view of trackInteractOutside
this is an outside action which leads to close of the dialog
https://github.com/chakra-ui/zag/blob/fb6fa8d3da3f607350d9d1608e696f8e12d481fa/packages/utilities/interact-outside/src/index.ts#L101C9-L101C17
I do not know why this happens only on touch devices, but workaround can apply the dom attribute hidden
or something similar instead of unmounting the button
Description
see this old issue which was closed, not fixed actually (I was able to reproduce it for all releases from 3.9 to 4.2).
https://github.com/chakra-ui/ark/issues/2816
Link to Reproduction (or Detailed Explanation)
https://stackblitz.com/~/github.com/dannylin108/parkui-bug-report
Steps to Reproduce
Ark UI Version
4.2.0
Framework
Browser
No response
Additional Information
No response