Repository navigation
fix(combo): show flat button focus on default add item - #18019
onlyexeption wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The changes suppress native keyboard-focus styling in both Combo variants and introduce unrelated global theme changes and removal of the custom add-item sample template.
3 open issues
What changed in this PR
Addresses #17992 by giving the default “Add item” button the theme’s flat-button focus styling in Combo and Simple Combo, while preserving custom-template styling.
Changes:
- Separates the add item’s active state from its list-item focus styling.
- Adds keyboard-focus and custom-template regression tests, plus a changelog entry.
- Changes the demo to dark Bootstrap and temporarily disables its custom add-item template for verification.
| File | Description |
|---|---|
src/styles/_variables.scss |
Switches the global demo theme and typography to dark Bootstrap. |
src/app/combo/combo.sample.html |
Comments out the custom add-item template to expose the default button. |
projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts |
Adds default-button keyboard-focus coverage. |
projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.html |
Binds the default button’s focus class to the add item’s active state. |
projects/igniteui-angular/combo/src/combo/combo.component.spec.ts |
Covers default-button focus transitions and preserved custom-template styling. |
projects/igniteui-angular/combo/src/combo/combo.component.html |
Applies button focus styling while retaining custom-template rendering. |
projects/igniteui-angular/combo/src/combo/combo-add-item.component.ts |
Adds active-state tracking and limits list-item focus styling to custom templates. |
CHANGELOG.md |
Documents the corrected Add item focus appearance. |
Review effort: Balanced
IMinchev64
left a comment
There was a problem hiding this comment.
Tested this locally against master with a small repro page (bootstrap dark/light, material, indigo, fluent, plus simple combo and a custom template). The gray fill / indigo outline is gone and the button gets its proper focus ring in every theme, nice. Custom template still keeps the old item focus look, Enter still adds the item, partial match works too. Combo + simple combo specs pass locally.
One thing though: the "focused without pressing anything" part of #17992 still happens in the simple combo, it just looks different now. Details inline, the rest is small stuff.
IMinchev64
left a comment
There was a problem hiding this comment.
Accidentally left my review as comments XD, so requesting changes with this one. Main blocker is the simple combo stale focus thing (see inline comment), the rest are nits.

Closes #17992
Description
The default "Add item" button no longer takes the dropdown's focused-item background or outline when it is reached with the keyboard. It now shows the theme's flat button focus state.
IgxComboAddItemComponent: the default add item no longer reports itself as a focused list item. A new internalactivegetter carries the active state.igx-button--focusedwhile the add item is active, so it picks up each theme's flat button focus styles. No SCSS changes.igxComboAddItemtemplates are unchanged.Motivation / Context
The add item wrapper got
igx-drop-down__item--focused, which painted a list-item fill or outline behind the flat button, e.g. solid gray in Bootstrap dark and an outline in Indigo. The fill depended on which stylesheet loaded last, so it showed in some apps and not in others.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Combo, Simple Combo
How Has This Been Tested?
New specs cover the no-match and partial-match keyboard paths, the Simple Combo, and an unchanged custom template. All Combo, Simple Combo and Drop Down specs pass (454). Checked manually in the demo with Bootstrap dark.
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)