-
Notifications
You must be signed in to change notification settings - Fork 159
fix(simple-combo): Focus on programmatically closing combo #16806
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes a critical performance issue (issue #16664) where repeatedly clicking between multiple igx-simple-combo components caused CPU usage to increase and eventually freeze the browser. The root cause was a focus loop introduced in PR #12170, where the combo input was always refocused when the dropdown closed, even when the close was triggered by user interaction (like clicking on another combo).
Changes:
- Modified the
dropdown.closingevent handler to only callthis.comboInput.focus()when the combo is closed programmatically (when!args.event), preventing focus loops when users click between multiple combos - Added an explanatory comment documenting why focus is only applied for programmatic closes
projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts
Outdated
Show resolved
Hide resolved
…-combo.component.spec.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Closes #16664
Only a programmatically closing combo should be focused. Initially it was like that but this PR forces
this.comboInput.focus();in both cases - when it's closed programmatically and due to user interaction:#12170