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

PickList | clicking on p-picklist would cause TypeError: Cannot read properties of undefined (reading 'getAttribute') #14339

Closed
bzhao16834 opened this issue Dec 12, 2023 · 1 comment
Labels
LTS-16-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@bzhao16834
Copy link

Describe the bug

When either availalbe or selected list is empty, clicking on p-picklist would cause TypeError: Cannot read properties of undefined (reading 'getAttribute') at PickList.changeFocusedOptionIndex (primeng-picklist.mjs:937:48)

Environment

Microsoft Edge for Business version 10.0.2210.61

Reproducer

https://www.primefaces.org/primeng-v16/picklist

Angular version

16.2.12

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0 and 16.9.1

Browser(s)

No response

Steps to reproduce the behavior

  1. Open PrimeNG Picklist page in a browser, https://www.primefaces.org/primeng-v16/picklist
  2. Hit F12 to open browser's developer console
  3. On PrimeNG Picklist page, FEATURES tab, Basic section, make sure the Selected list of demo picklist is empty.
  4. Click anywhere in Selected area, and inspect developer console. You should be able to observe ERROR TypeError: Cannot read properties of undefined (reading 'getAttribute') in console output
  5. Same error would occur if empty picklist receives focus

Expected behavior

No error in console output when empty picklist is clicked or receives focus

@bzhao16834 bzhao16834 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 12, 2023
@cetincakiroglu cetincakiroglu added this to the 17.1.0 milestone Dec 13, 2023
@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 Dec 13, 2023
@cetincakiroglu
Copy link
Contributor

Fixed in #14342

@cetincakiroglu cetincakiroglu changed the title Component: PickList PickList | clicking on p-picklist would cause TypeError: Cannot read properties of undefined (reading 'getAttribute') Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-16-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants