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: Global esc key listener with priority [600, 0] already exists #7220

Closed
marengga opened this issue Sep 19, 2024 · 6 comments · Fixed by #7228
Closed

Calendar: Global esc key listener with priority [600, 0] already exists #7220

marengga opened this issue Sep 19, 2024 · 6 comments · Fixed by #7228
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@marengga
Copy link
Contributor

Describe the bug

I encountered an issue when using two Calendar components on the same page as time pickers. The error appears after selecting time in first calendar and move the focus to second calendars.
This issue happens when the Calendar component is used as a time picker, not only as a date picker.

Error: Unexpected: global esc key listener with priority [600, 0] already exists.
I believe the error is related to the useGlobalOnEscapeKey hook, which may be misconfigured or have a bug affecting the Calendar component's behavior.

Reproducer

https://stackblitz.com/edit/stackblitz-starters-tuzydi?file=app%2Fpage.tsx

System Information

System:
    OS: macOS 14.6.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 593.41 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.2.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
    Watchman: 2023.11.20.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 128.0.6613.138
    Safari: 17.6
  npmPackages:
    primereact: ^10.8.3 => 10.8.3 
    react: ^18 => 18.2.0 
    tailwindcss: ^3.3.0 => 3.4.0

Steps to reproduce the behavior

  1. Select a start time in the first Calendar component.
  2. Without pressing any keys or clicking elsewhere, select an end time in the second Calendar component. An error occurs at this point.

Expected behavior

The calendars should function independently as time pickers without triggering any errors.

@marengga marengga added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 19, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 19, 2024
@melloware
Copy link
Member

@avasuro interested in looking into this one?

@ozantekin
Copy link
Contributor

@avasuro interested in looking into this one?

I’ve submitted a PR to address this issue. @melloware

@noeesparsa
Copy link

noeesparsa commented Sep 30, 2024

Hello @melloware ! Do you know when it will be available ? or when next version will be published with this fix ?

@melloware
Copy link
Member

@noeesparsa i don't have any insight when PrimeTek does releases. Hopefully soon?

@sebasdeweert
Copy link

Hi @melloware, will this bug be fixed in the newest version of primereact 10.8.4?

@melloware
Copy link
Member

Yes it will. Whenever 10.8.4 gets released...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants