Skip to content

Commit

Permalink
Fix lint and call super
Browse files Browse the repository at this point in the history
  • Loading branch information
m-akinc committed Mar 1, 2024
1 parent 766548f commit f130989
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions packages/nimble-components/src/combobox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,6 @@ export class Combobox
this.filteredOptions = enabledOptions;
}

protected override focusAndScrollOptionIntoView(): void {
if (this.open && this.contains(document.activeElement)) {
this.control.focus();
if (this.firstSelectedOption) {
requestAnimationFrame(() => {
this.firstSelectedOption?.scrollIntoView({
block: 'nearest'
});
});
}
}
}

/**
* This is a workaround for the issue described here: https://github.com/microsoft/fast/issues/6267
* For now, we will update the value ourselves while a user types in text. Note that there is other
Expand Down Expand Up @@ -220,6 +207,12 @@ export class Combobox
return returnValue;
}

protected override focusAndScrollOptionIntoView(): void {
if (this.open) {
super.focusAndScrollOptionIntoView();
}
}

protected override openChanged(): void {
super.openChanged();
if (this.dropdownButton) {
Expand Down

0 comments on commit f130989

Please sign in to comment.