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

Autocomplete: Error when deleting input text if virtualscroll is enabled #16227

Closed
pertsim opened this issue Aug 14, 2024 · 0 comments · Fixed by #16238 · 4 remaining pull requests
Closed

Autocomplete: Error when deleting input text if virtualscroll is enabled #16227

pertsim opened this issue Aug 14, 2024 · 0 comments · Fixed by #16238 · 4 remaining pull requests
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working v18-port
Milestone

Comments

@pertsim
Copy link

pertsim commented Aug 14, 2024

Describe the bug

Since this change deleting all input text in an autocomplete component causes an error if virtual scroll is enabled.

TypeError: Cannot read properties of undefined (reading 'target') at l.onScrollPositionChange (chunk-5I3XIQUC.js:1:15922) at l.onScrollChange (chunk-5I3XIQUC.js:1:17809) at a.hide (chunk-STRRJQ3Y.js:1:33921) at chunk-STRRJQ3Y.js:1:26721 at I.<computed> (polyfills-A7MJM4D4.js:1:21056) at u.invokeTask (polyfills-A7MJM4D4.js:1:7010) at Object.onInvokeTask (chunk-XLNFN2AU.js:7:60159) at u.invokeTask (polyfills-A7MJM4D4.js:1:6931) at Y.runTask (polyfills-A7MJM4D4.js:1:2327) at invokeTask (polyfills-A7MJM4D4.js:1:8084)

Environment

PrimeNg 17.18.6

Reproducer

https://stackblitz.com/edit/1hmsvt?file=package.json

Angular version

18

PrimeNG version

17.18.8

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.14.0

Browser(s)

Chrome

Steps to reproduce the behavior

Open the page https://primeng.org/autocomplete#virtualscroll
Open the Developer Console
Enter some text into the autocomplete field
Delete all the entered text

Expected behavior

No error occurs

@pertsim pertsim added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 14, 2024
@mehmetcetin01140 mehmetcetin01140 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 Aug 15, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Aug 15, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.18.9 milestone Aug 15, 2024
cetincakiroglu added a commit that referenced this issue Aug 15, 2024
Fixed #16227 - Autocomplete: Error when deleting input text if virtua…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment