Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert in popover dismisses all ancestors when click outside; ESC also cause inconsistent dismissing behavior. #6907

Open
wuyuanyi135 opened this issue Jul 12, 2024 · 0 comments

Comments

@wuyuanyi135
Copy link

Environment

  • Package version(s): 5.10.3
  • Operating System: Windows 11
  • Browser name and version: Edge 126.0.2592.87

Code Sandbox

[[Link to a minimal repro (fork this code sandbox): ](https://codesandbox.io/p/devbox/confident-thompson-zhvzw4?workspaceId=55dc2776-ce66-4b8f-93aa-1823e6666f9e)
](https://codesandbox.io/p/devbox/confident-thompson-zhvzw4?workspaceId=55dc2776-ce66-4b8f-93aa-1823e6666f9e)

Steps to reproduce

Reproduction of faulty click outside dismissing behavior (see video below):
  1. Create an alert in a popover
  2. Dismiss the alert by clicking outside
Reproduction of faulty ESC dismissing behavior (see video below):
  1. Create an alert (canEscapeKeyCancel=false) in a popover (canEscapeKeyCancel=true)
  2. Use ESC should not dismiss the alert. However it dismissed the popover, consequentially dismissed its children alert.

NOTE: in thi MRE I have to manually dismiss all popover to reproduce this error.

Actual behavior

The dismissing behavior is buggy

faulty click outside:
click outside

ESC dismissing problem:
esc

Expected behavior

For clicking outside, with only a single click, only the topmost alert should be dismissed;

For ESC dismissing, if the topmost popover has canEscapeKeyCancel=False, ESC should not dismiss its parent overlays

Possible solution

Need a solution. I presume that the problem lies in the hierachy of nodes. i.e., clicking on the backdrop of the topmost alert did not stop it propagate to the parent backdrop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant