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!
Activity