Skip to content

Commit 1432c67

Browse files
authored
Merge branch 'master' into bpachilova/fix-12608
2 parents 4a541bf + 2c644b1 commit 1432c67

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ All notable changes for each version of this project will be documented in this
88
- Added new auto-sizing API `recalculateAutoSizes` that recalculates widths of columns that have size set to `auto`. Can be used in scenarios where you want to auto-size the columns again post initialization.
99
- `igxPivotGrid`
1010
- Adding `aggregatorName` for pivot value configuration as an alternative to setting `aggregator` function. If both are set `aggregatorName` takes precedent. If none are set an error is thrown.
11+
- `IgxSimpleCombo`
12+
- **Behavioral Change** - Keyboard navigation `ArrowUp` - when the combo is opened `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
1113

1214
## 15.0.0
1315

projects/igniteui-angular/src/lib/simple-combo/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ When defining one of them, you need to reference list of predefined names, as fo
243243
## Keyboard Navigation
244244

245245
When the combo is closed and focused:
246-
- `ArrowDown` or `Alt` + `ArrowDown` will open the dropdown and will move focus to the selected item, if no selected item is present, the first item in the list will lbe focused.
246+
- `ArrowDown` or `Alt` + `ArrowDown` will open the dropdown and will move focus to the selected item, if no selected item is present, the first item in the list will be focused.
247247

248248
When the combo is opened:
249-
- `ArrowUp` will close the dropdown and will move focus to the input while also selecting all of the text in the input if the currently focused item is the first item in the list. Otherwise `ArrowUp` will move to the previous list item.
249+
- `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
250250
- `ArrowDown` will move focus from the search input to the first list item. If list is empty and custom values are enabled will move it to the Add new item button.
251251
- `Alt` + `ArrowUp` will close the dropdown.
252252

projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,24 @@ describe('IgxSimpleCombo', () => {
857857
expect(combo.close).toHaveBeenCalledTimes(2);
858858
}));
859859

860+
it('should not close the dropdown on ArrowUp key if the active item is the first one in the list', fakeAsync(() => {
861+
combo.open();
862+
tick();
863+
fixture.detectChanges();
864+
865+
const list = fixture.debugElement.query(By.css(`.${CSS_CLASS_CONTENT}`));
866+
867+
UIInteractions.triggerEventHandlerKeyDown('ArrowDown', list);
868+
tick();
869+
fixture.detectChanges();
870+
expect(combo.collapsed).toEqual(false);
871+
872+
UIInteractions.triggerEventHandlerKeyDown('ArrowUp', list);
873+
tick();
874+
fixture.detectChanges();
875+
expect(combo.collapsed).toEqual(false);
876+
}));
877+
860878
it('should select an item from the dropdown list with the Space key without closing it', () => {
861879
combo.open();
862880
fixture.detectChanges();

projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
398398
this.dropdownContainer.nativeElement.focus();
399399
} else {
400400
this.comboInput.nativeElement.focus();
401-
this.toggle();
402401
}
403402
}
404403

0 commit comments

Comments
 (0)