Galleria: Cannot read properties of undefined when tabbing through component #13945
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When tabbing through a galleria component, the tabbing will cause an unhandled exception stating
Cannot read properties of undefined (reading: 'code')
which is occurring within theonIndicatorKeyDown
method of theGalleriaItem
. This issue causes the tabbing to get stuck within the galleria item, and not progress to the next item on the page.Proposed Fix:
primeng/src/app/components/galleria/galleria.ts
Line 677 in 21e0575
The line above should be changed to
$event
instead ofevent
so that the event object passed to theonIndicatorKeyDown
method isn'tundefined
Environment
PrimeNG 16.5.1 and Angular 16.0.5
Reproducer
No response
Angular version
16.0.5
PrimeNG version
16.5.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.14.0
Browser(s)
Chrome 118
Steps to reproduce the behavior
1.) On a page utilizing an existing
p-galleria
component with multiple images, tab into the component.2.) Once you tab through all the navigator "dots" on the component, the error mentioned in the description will be shown in the console, and you'll be unable to tab out of the component.
Expected behavior
The console error shouldn't be thrown, and the user should be able to tab out of the
p-galleria
component.The text was updated successfully, but these errors were encountered: