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: Console.Error/Crash when pressing Escape key using Inline Calendar #4732

Closed
ben-hamel opened this issue Nov 1, 2023 · 0 comments · Fixed by #4733
Closed

Calendar: Console.Error/Crash when pressing Escape key using Inline Calendar #4732

ben-hamel opened this issue Nov 1, 2023 · 0 comments · Fixed by #4733
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ben-hamel
Copy link

Describe the bug

When escape key is pressed on Inline Calendar it causes a Console Error, it also crashes our Storybook when escape key is pressed.

Would also enjoy having an emit available to handle as we please when using the Inline Calendar.

Reproducer

https://codesandbox.io/s/gracious-napier-q3q83k

PrimeVue version

3.23.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Go to Inline Calendar example in PrimeVue docs.
  2. interact with Calendar.
  3. press ESC key.
  4. check browser dev tools for error
    entry.4dc39b69.js:1 TypeError: Cannot read properties of undefined (reading 'focus') at Proxy.onOverlayKeyDown (Calendar.dc381ab1.js:149:37092) at e.inline.s.overlayVisible.l.onKeydown.t.<computed>.t.<computed> (Calendar.dc381ab1.js:161:7137) at At (entry.4dc39b69.js:1:12867) at Be (entry.4dc39b69.js:1:12945) at HTMLDivElement.n (entry.4dc39b69.js:1:71754)

Expected behavior

To not trigger error when press ESC key and to emit an ESC event.

@ben-hamel ben-hamel 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 1, 2023
FlipWarthog added a commit to FlipWarthog/primevue that referenced this issue Nov 1, 2023
tugcekucukoglu added a commit that referenced this issue Nov 3, 2023
Fix #4732 - Calendar: Console.Error/Crash when pressing Escape key using Inline Calendar
@tugcekucukoglu tugcekucukoglu 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 Nov 3, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.40.0 milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
2 participants