fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.48k stars 515 forks source link

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

Closed orrindeng closed 1 year ago

orrindeng commented 1 year ago

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 commented 1 year ago

Thanks for contributing!