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

Dropdown: Escape Key event not default prevented #13463

Closed
JanST123 opened this issue Aug 8, 2023 · 1 comment · Fixed by #13464
Closed

Dropdown: Escape Key event not default prevented #13463

JanST123 opened this issue Aug 8, 2023 · 1 comment · Fixed by #13464
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@JanST123
Copy link
Contributor

JanST123 commented Aug 8, 2023

Describe the bug

When closing a dropdown overlay via 'Escape' Key on keyboard, the event is not default prevented. Therefore other components cannot detect that this keyboard event was already processed.

Environment

Angular 16 with primeNG 16

Reproducer

No response

Angular version

16.0.5

PrimeNG version

16.0.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18

Browser(s)

No response

Steps to reproduce the behavior

  1. Use a dropdown in a dialog that closed on 'Escape' key event
  2. Open dropdown
  3. Press 'Escape' key
  4. Dropdown overlay AND the dialog closes

Expected behavior

The dropdown should close but the dialog should recognize that event.defaultPrevented is true and should not close

@JanST123 JanST123 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 8, 2023
@JanST123 JanST123 changed the title Component: Title Dropdown: Escape Key event not default prevented Aug 9, 2023
@gucal gucal added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 26, 2023
@gucal gucal added this to the 16.2.1 milestone Aug 26, 2023
@gucal
Copy link
Member

gucal commented Aug 26, 2023

Good catch, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants