You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MudComboBoxItem: Disabled items can still be selected by clicking #659
MudComboBoxItem does not prevent selection when Disabled is set to true.
Although disabled items are visually marked and excluded from eligible item lists, clicking a disabled item can still change the selected value.
Root cause
MudComboBoxItem.HandleOnClick() does not check the Disabled state before calling MudComboBox.ToggleOption().
Additionally, ToggleOption() does not independently reject disabled items.
Expected behavior
Disabled items must not be selectable through mouse interaction.
Clicking a disabled item must not change the ComboBox selection.
Disabled items must not trigger selection-related callbacks.
Suggested fix
Ensure disabled items cannot initiate selection through HandleOnClick(), and consider enforcing the same restriction in ToggleOption() to protect the selection logic consistently.
Regression test
A regression test has already been introduced in PR #656:
ComboBox_DisabledItemShouldNotBeSelectable
The test is currently marked with [Ignore] to document the known issue without breaking CI.
Once fixed, the test should be enabled and verified.
Credits
This issue was discovered during the expanded ComboBox and ComboBoxItem test coverage contributed in #656.
Thanks to @Yomodo for the valuable contribution and for identifying an existing behavioral bug while improving our test coverage!
Hi @mckaragoz, I can take this if you haven't started on it.
I'd return early from MudComboBoxItem.HandleOnClick when the item is disabled, and also make ToggleOption ignore a disabled item so other callers are covered too. Then I'd remove the [Ignore] from ComboBox_DisabledItemShouldNotBeSelectable and add a MultiSelection case.
Should the item's own OnClick still fire for a disabled item, or should the click do nothing at all?
Activity
nurullahturkoglu commentedon Nov 28, 2026
Hi @mckaragoz, I can take this if you haven't started on it.
I'd return early from
MudComboBoxItem.HandleOnClickwhen the item is disabled, and also makeToggleOptionignore a disabled item so other callers are covered too. Then I'd remove the[Ignore]fromComboBox_DisabledItemShouldNotBeSelectableand add aMultiSelectioncase.Should the item's own
OnClickstill fire for a disabled item, or should the click do nothing at all?mckaragoz commentedon Nov 28, 2026
Of course.
I think there should be no call. Disabled item should not be interactive.