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 on tab keydown #15287

Closed
Xylios13 opened this issue Apr 17, 2024 · 0 comments · Fixed by #15312
Closed

Calendar: Error on tab keydown #15287

Xylios13 opened this issue Apr 17, 2024 · 0 comments · Fixed by #15312
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@Xylios13
Copy link

Xylios13 commented Apr 17, 2024

Describe the bug

Pressing tab several times in a p-calendar that is only showing time and is inline will lead to the following error:

preview-afd2289b8907a.js:2 ERROR TypeError: Cannot read properties of null (reading 'children')
    at Calendar.onContainerButtonKeydown (calendar.ts:2018:14)
    at Calendar_div_3_div_5_Template_button_keydown_8_listener (ɵcmp.js:268:29)
    at executeListenerWithErrorHandling (projection.ts:20:1)
    at wrapListenerIn_markDirtyAndPreventDefault (projection.ts:51:1)
    at HTMLButtonElement.eval (dom_renderer.ts:375:10)
    at _ZoneDelegate.invokeTask (zone.umd.js:446:35)
    at eval (ng_zone.ts:22:1)
    at AsyncStackTaggingZoneSpec.onInvokeTask (ng_zone.ts:22:1)
    at _ZoneDelegate.invokeTask (zone.umd.js:445:40)
    at Object.onInvokeTask (ng_zone.ts:442:22)

Environment

I was able to reproduce this error on a stackblitz, https://stackblitz.com/edit/github-naqavf?file=src%2Fapp%2Fapp.component.html

Reproducer

https://stackblitz.com/edit/github-naqavf?file=src%2Fapp%2Fapp.component.html

Angular version

17.3.4

PrimeNG version

17.13.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.19.0

Browser(s)

Chrome 123.0.6312.123

Steps to reproduce the behavior

  1. Create a p-calendar with the following properties:
<p-calendar
  [inline]="true"
  [showTime]="true"
  [showSeconds]="true"
  [timeOnly]="true"
></p-calendar>
  1. Give the focus to the calendar component (for example, select the hour display)
  2. Press tab until you see a console error.

Expected behavior

It is expected that the tab key press works without any console error.

@Xylios13 Xylios13 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 17, 2024
cetincakiroglu added a commit that referenced this issue Apr 19, 2024
Fixed #15287 - Add condition for timeOnly
@cetincakiroglu cetincakiroglu 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 Apr 19, 2024
@cetincakiroglu cetincakiroglu self-assigned this Apr 19, 2024
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
Development

Successfully merging a pull request may close this issue.

2 participants