Skip to content

Commit d759063

Browse files
Ensure ComboBox smart hint behaves according to MD spec
According to the "Behavior" section of the "Menus" page in the link below, the hint should float even when there is no selection, but the popup is open. https://m2.material.io/components/menus#exposed-dropdown-menu
1 parent 97d2cb5 commit d759063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MaterialDesignThemes.Wpf/SmartHint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private void RefreshState(bool useTransitions)
258258
string state = string.Empty;
259259

260260
bool isEmpty = proxy.IsEmpty();
261-
bool isFocused = proxy.IsFocused();
261+
bool isFocused = HintHost?.IsKeyboardFocusWithin ?? proxy.IsFocused();
262262

263263
if (UseFloating)
264264
state = !isEmpty || isFocused ? HintFloatingPositionName : HintRestingPositionName;

0 commit comments

Comments
 (0)