Skip to content

Commit

Permalink
Fix combobox can't open dropdown when the editable textbox of it has …
Browse files Browse the repository at this point in the history
…the focus
  • Loading branch information
Deng Aolin committed Mar 13, 2023
1 parent 9a66e30 commit e7151b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Fluent.Ribbon/Controls/ComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,11 @@ protected override void OnDropDownOpened(EventArgs e)

if (this.SelectedItem is not null)
{
Keyboard.Focus(this.ItemContainerGenerator.ContainerOrContainerContentFromItem<IInputElement>(this.SelectedItem));
var selectedItemContainser = this.ItemContainerGenerator.ContainerOrContainerContentFromItem<IInputElement>(this.SelectedItem);
if (selectedItemContainser is not null)
{
Keyboard.Focus(selectedItemContainser);
}
}

this.focusedElement = Keyboard.FocusedElement;
Expand Down

0 comments on commit e7151b2

Please sign in to comment.