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

click-triggered Popover not closing when ESC pressed #47887

Closed
theiliad opened this issue Mar 14, 2024 · 3 comments
Closed

click-triggered Popover not closing when ESC pressed #47887

theiliad opened this issue Mar 14, 2024 · 3 comments

Comments

@theiliad
Copy link

theiliad commented Mar 14, 2024

Reproduction link

Edit on StackBlitz

Steps to reproduce

  1. Create a popover
  2. Add trigger={['click']}
  3. Open
  4. Press ESC

What is expected?

Popover should close. This'd be consistent with <Select />, <Modal /> and <Dropdown />

What is actually happening?

It stays open, and focus moves to button

Environment Info
antd 5.15.2
React 18
System Mac Sonoma
Browser Chrome 122.0.6261.112
Copy link

stackblitz bot commented Mar 14, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@theiliad
Copy link
Author

This could also be controlled through a prop, e.g. closeOnEscape

@afc163
Copy link
Member

afc163 commented Mar 22, 2024

Closed by #47928

@afc163 afc163 closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants