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

Calendar: "Error: Duplicate global Esc key listener with priority [600, 0] in Calendar components" #7407

Closed
Oko-Tester opened this issue Nov 11, 2024 · 3 comments
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Milestone

Comments

@Oko-Tester
Copy link

Oko-Tester commented Nov 11, 2024

Describe the bug

The following error occurs when interacting with multiple calendar components in PrimeReact:

Uncaught Error: Unexpected: global esc key listener with priority [600, 0] already exists.
    at Object.addListener (_app-076b402d275c7b07.js:1:150514)
    at _app-076b402d275c7b07.js:1:150856
    at ti (framework-eae1dab60e375b5f.js:1:93682)
    at ws (framework-eae1dab60e375b5f.js:1:113909)
    at framework-eae1dab60e375b5f.js:1:112644
    at ks (framework-eae1dab60e375b5f.js:1:112710)
    at us (framework-eae1dab60e375b5f.js:1:106429)
    at jl (framework-eae1dab60e375b5f.js:1:46917)
    at framework-eae1dab60e375b5f.js:1:103824

Error also occurs in the official PrimeReact documentation.

Reproducer

https://stackblitz.com/edit/rtiuwb?file=src%2FApp.jsx

System Information

npmPackages:
   primereact: ^10.8.3 => 10.8.3
   react: ^18.3.1 => 18.3.1

Steps to reproduce the behavior

  1. Click on a calendar component and select a date.
  2. Click on a different calendar component to open it.
  3. The error appears in the console.

Expected behavior

The global listener for the Escape key should not be added multiple times. Ideally, a single listener should be sufficient, or any existing listener should be removed before adding a new one.

@Oko-Tester Oko-Tester added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 11, 2024
@Oko-Tester Oko-Tester changed the title Calendar: "Error: Duplicate global Esc key listener with priority [600, 0] in PrimeReact components" Calendar: "Error: Duplicate global Esc key listener with priority [600, 0] in Calendar components" Nov 11, 2024
@melloware
Copy link
Member

@Oko-Tester this was fixed in 10.8.4: #7220 can you try 10.8.4?

@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 11, 2024
@melloware melloware added this to the 10.8.4 milestone Nov 11, 2024
Copy link

This issue is a duplicate and has already been reported and possibly fixed. Please review other issues both open and closed for a similar issue to this one.

@Oko-Tester
Copy link
Author

@melloware I updated my version, and it works now. Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

2 participants