Skip to content

Fix combobox can't open dropdown when the editable textbox of it has the focus#1114

Merged
batzen merged 2 commits intofluentribbon:developfrom
orrindeng:pr230313
Mar 13, 2023
Merged

Fix combobox can't open dropdown when the editable textbox of it has the focus#1114
batzen merged 2 commits intofluentribbon:developfrom
orrindeng:pr230313

Conversation

@orrindeng
Copy link
Copy Markdown
Contributor

@orrindeng orrindeng commented Mar 13, 2023

The code has detected the SelectedItem is not null, and I think it's better to detect container is not null too. Especially when the ComboBox dropdown is never open.

If the given target of the Keyboard.Focus method is null, the keyboard will focus to the RootVisual like MainWindow. It causes the keyboard focus changes if the keyboard has been already focused on it. But in .NET WPF code, when the IsKeyboardFocusWithin changed, it may cause the dropdown closed immediately.

image

@batzen batzen merged commit d8516fe into fluentribbon:develop Mar 13, 2023
@batzen
Copy link
Copy Markdown
Member

batzen commented Mar 13, 2023

Thanks for contributing!

batzen added a commit that referenced this pull request Mar 13, 2023
@orrindeng orrindeng deleted the pr230313 branch March 14, 2023 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants